NAME
WebService::EveOnline::Cache -- provide a cache for use by WebService::EveOnline
SYNOPSIS
Currently, for use by WebService::EveOnline only. It makes all kinds of hideous assumptions, and probably only works for SQLite databases. You can override the defaults when you instantiate the WebService::EveOnline module. It is recommended that you study the source code (dear no, it burns!) if you feel inclined to do this.
It is mainly used to store the Eve Online skills tree, and cache any calls to the Eve Online API so we don't keep clobbering the network every time we want to find something out.
new
Instantiates the WebService::EveOnline cache. Assuming the type is SQLite (the default) it attempts to open the db file if it exists.
cache_age
Returns the age of the database cache in epoch seconds.
repopulate
Attempts to delete the sqlite database file and rebuild it. It should be called with the data structure returned from the all_eve_skills method, i.e. the raw datastructure that XML::Simple spits out. It really does nothing clever at all, and all of this code will need to be significantly refactored at a later date.
get_skill
Returns skill data based on a typeID.
retrieve
Retrieves a previously-run command from the cache. It checks the age of the cache. It will return no data if the cache has expired, or if the command has not been run before.
store
Stores the result of a command in the database cache. Returns whatever datastructure is passed to it. The data is stored in Storable format.