Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scottchiefbaker/perl-cache-tiny
Cache::Simple - Super simple perl disk cache
https://github.com/scottchiefbaker/perl-cache-tiny
Last synced: 26 days ago
JSON representation
Cache::Simple - Super simple perl disk cache
- Host: GitHub
- URL: https://github.com/scottchiefbaker/perl-cache-tiny
- Owner: scottchiefbaker
- License: gpl-2.0
- Created: 2015-04-07T21:57:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-10T17:43:49.000Z (over 9 years ago)
- Last Synced: 2023-04-08T11:56:21.010Z (over 1 year ago)
- Language: Perl
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cache::Tiny
### Super simple disk based cached using *only* core Perl modules
Similar concept to memcached: get/set/delete. For a more full featured Perl cache module,
look at [Cache::Cache](https://metacpan.org/pod/Cache::Cache). This was designed to be a single function, which be copy/pasted in to existing code```perl
use cache; # Or copy/paste the cache() function to your code# Store an item in the cache indefinitely
$ok = cache("name", "scott");# Store an item in the cache for 60 seconds
$ok = cache("name", "scott", time() + 60);# Fetch an item from the cache
$name = cache("name");# Delete an item from the cache
$ok = cache("name", undef);
```