implementation of AppHandle for the GO API, which delegates all
function to another AppHandle, but caches all results in
memory. Generally speaking this trades space for speed. If you use
large parts of the GO database, this class will use extremely large
amounts of memory.
This class is somewhat experimental at the moment. It has a number
of flaws. In particular, it does not implement a true flyweight, so
that for instance a single GO Term is represented by a single
GO::Model::Term object. Different methods, or single methods with
different parameters, which return the same GO term, will return
different Term objects. At the moment some of the methods are
flyweighted. It is possible to flyweight others, but in this case
they will sometimes return objects with the wrong values! You can
read the in code documentation for details.
My own use of the GO API is limited to a small subset of the methods.
So these have been well tested. Others have not, and might be
returning the wrong values anyway!
The class works by defining a cache where it stores all the results
from previous method calls.
The cache is just a single big hash. This is keyed on the method
names. The value is another hash. This is keyed dependant on the
function parameters, and the value is the return.
The way the key is calculated for the second parameter depends on
what the types of the parameters are. There are four of different
ways of doing this at the moment.
This function calls a second function in the delegated AppHandle, caching
the results. Cached results will be returned the second time around.
Caching is done in a hash, which is keyed on the parameter passed in.
Args - string representing the method to be called.
arrayref representing the parameters of the method
string representing the hash to be used for storing the return