walhalla.data
Wiki
A utility class for caching data retrieved from a server. The cache is stored in a local directory and is valid for up to 7 days. If the cache is expired or does not exist, the data is fetched from the server and saved to the cache.
Wiki
()
sourceByName
(String
name
)
String
String
name
)String name |
The name of the data to retrieve. |
String |
The data as a string. |
Retrieves data associated with the given name. If a valid cache exists, it returns the cached data. Otherwise, it fetches the data from the server, saves it to the cache, and returns it.
source
(String
name
)
String
String
name
)String name |
The name of the data to retrieve. |
String |
The data as a string. |
Retrieves data associated with the given name. If a valid cache exists, it returns the cached data. Otherwise, it fetches the data from the server, saves it to the cache, and returns it.
source
(String
name
, long
cache
)
String
String
name
, long
cache
)String name |
The name of the data to retrieve. |
long cache |
|
String |
The data as a string. |
Retrieves data associated with the given name. If a valid cache exists, it returns the cached data. Otherwise, it fetches the data from the server, saves it to the cache, and returns it.