Skip to content

Instantly share code, notes, and snippets.

@ldclakmal
Last active June 6, 2020 14:58
Show Gist options
  • Save ldclakmal/1b8d031a5aa4bfa447f8a49129db4475 to your computer and use it in GitHub Desktop.
Save ldclakmal/1b8d031a5aa4bfa447f8a49129db4475 to your computer and use it in GitHub Desktop.
Abstract Cache of Ballerina
public type AbstractCache abstract object {
public function put(string key, any value, int maxAgeInSeconds = -1) returns Error?;
public function get(string key) returns any|Error;
public function invalidate(string key) returns Error?;
public function invalidateAll() returns Error?;
public function hasKey(string key) returns boolean;
public function keys() returns string[];
public function size() returns int;
public function capacity() returns int;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment