Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

Java SimpleCache

The Java SimpleCache Class is an easy way to cache 3rd party API calls.

Usage

A very basic usage example:

SimpleCachecache = newSimpleCache();
Stringdata = cache.get_data("label", "http://some.api.com/file.json");
System.out.println(data);

A more advanced example:

SimpleCachecache = newSimpleCache();
cache.set_cache_time(3);
cache.set_cache_path("cache/"); cache.set_cache_extension(".json");
Stringdata = null;
if(cache.is_cached("label")) {
data = cache.get_cache("label");
} else {
data = cache.grab_url("http://some.api.com/file.json");
cache.set_cache("label", data);
}
System.out.println(data);

Credits

SimpleCache Caching Class Originally published in PHP by Gilbert Pellegrom. Ported to Java by me :)

About

A simple file based caching library for caching 3rd party API calls in Java.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages