Chris Carline > WebService-EveOnline > WebService::EveOnline::Cache



Annotate this POD


Open  4
View/Report Bugs
Module Version: 0.61   Source  


WebService::EveOnline::Cache -- provide a cache for use by WebService::EveOnline


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.


Instantiates the WebService::EveOnline cache. Assuming the type is SQLite (the default) it attempts to open the db file if it exists.


Returns the age of the database cache in epoch seconds.


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.


Returns skill data based on a typeID.


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.


Stores the result of a command in the database cache. Returns whatever datastructure is passed to it. The data is stored in Storable format.

syntax highlighting: