- EXPORTED FUNCTIONS
- COPYRIGHT AND LICENSE
Cache::Reddit - a caching API that uses Reddit as the backend
use Cache::Reddit; my $id = set($data_ref); # serialize data and post to subreddit my $data = get($id); # retrieve the data back remove($id); # delete the data from Reddit
Cache::Reddit is a module for cacheing your application data on Reddit. Data is serialized using Storable and posted to a subreddit. The data is posted as a text post, and the title of the post set to Cache::Reddit:: + a random number.
The text is bleached before posting (converted to binary,
tr/01/ \t/g) so it appears as whitespace on Reddit.
Due to the list-like search function, data retrieval performs at 0(n). However deletion and insertion performs at 0(1).
It requires three environment variables to be set:
reddit_username - the reddit username to login with
reddit_password - the reddit password to login with
reddit_subreddit - the target subreddit to post data to
Serializes and saves the data in the subreddit as a text post. Returns the key for cached entry;
Deserializes and returns the cached entry.
Deletes the item from the subreddit.
David Farrell <firstname.lastname@example.org>
This software is Copyright (c) 2015 by David Farrell.
This is free software, licensed under:
The (two-clause) FreeBSD License