Skip to content

Instantly share code, notes, and snippets.

@ldclakmal
Created June 6, 2020 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldclakmal/444f5f1aeb3263bdad46a1174efc2038 to your computer and use it in GitHub Desktop.
Save ldclakmal/444f5f1aeb3263bdad46a1174efc2038 to your computer and use it in GitHub Desktop.
Cache Usage without Error Handling
_ = check cache.put("key1", "value1");
string value = <string> check cache.get("key1");
_ = check cache.invalidate("key1");
_ = check cache.invalidateAll();
boolean hasKey = cache.hasKey("key1");
string[] keys = cache.keys();
int size = cache.size();
int capacity = cache.capacity();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment