Giter Club home page Giter Club logo

clorine's Introduction


Markdownify
Clorine

A child's play LRU In-memory & disk caching library for java apps.

Key FeaturesHow To UseImplimentation

Markdownify

Clorine is a simple and easy to use caching library for java. It uses LRU (Least recently used) algorithim for saving and deleting cache. This library facilates In-memory cache along with disk cache. Means that your cache is actually sotred on the disk but a another in-memory cache is also created when you use that cache frequently to save time.

🎯Key Features

  • Super simple, made using the most simples design ever
  • Automatically manage the cache heap and memory
  • Can directly cache objects (POJO's)

💉Implimentation

Gradle :-

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.ErrorxCode:Clorine:Tag'
	}

Maven :-

Step 1. Add to project level file

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Step 2. Add the dependency

	<dependency>
	    <groupId>com.github.ErrorxCode</groupId>
	    <artifactId>Clorine</artifactId>
	    <version>Tag</version>
	</dependency>

📃Usage

The usage of this library is this much simple that it cannot be explained in words.

First create a cache:

Cache demo = Clorine.createOrOpen(20,"demo",cacheDir);

20 is the limit of data/objects in the memory cache. There is no limit in disk cache.

Then use it like this:

// To store cache, you don't need to do anything else
cache.put("name","xcode");  
cache.put("person1",new Person("xcode",5,false));  
cache.put("person2",new Person("frank",42,true));

// To get data
cache.get("name",String.class);  
cache.get("person",Person.class);

🆘Support

If you like my work then you can suppot me by giving this repo a ⭐. You can check my other repos as well, if you found this library userfull then you will definetly fine more in my profiles.

You may also like...

Powered by 💓

A account less backend for android

clorine's People

Contributors

errorxcode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.