ADOdb provides replacement functions that look for cached results, instead of querying the database directly. The names of the methods match the normal method names but with the word 'cache' prepended, e.g.
The format of the parameters in the cache methods matches that of the normal methods, except for the fact that the parameters are shifted one entry and the first parameter is always the TTL (Time-To-Live) of the query.
/* * look for a cached query with a life of 2400 seconds */ $sql = 'SELECT code,description FROM xref_table'; $db->cacheGetAssoc(2400,$sql);
The response from the cache functions is exactly the same as the normal functions.