No Description

Matt Clark 936bc9da62 Release 1.5.1 2 weeks ago
src 936bc9da62 Release 1.5.1 2 weeks ago
.gitignore 5efdf02fc5 Initial commit of LibAPIs. 2 years ago
README.md 936bc9da62 Release 1.5.1 2 weeks ago
pom.xml 936bc9da62 Release 1.5.1 2 weeks ago

README.md

LibObjectCache

A simple java helper library for managing a cache of objects.

Maven Dependency

Include the library in your project by adding the following dependency to your pom.xml

<dependency>
    <groupId>com.mclarkdev.tools</groupId>
    <artifactId>libobjectcache</artifactId>
    <version>1.5.1</version>
</dependency>

Example

To create custom Cached Objects, simply extend the LibObjectCacheCachedObject class.

// Add object to the cache
LibObjectCache.getCache("objects").put("obj-1", new MyCachedObject());

// Recall from cache later
MyCachedObject o = LibObjectCache.getCache("objects").get("obj-1");

// Object details
o.isExpired();
o.getTouchCount();
o.getTimeCreated();
o.getTimeExpires();

License

Open source & free for all. ❤