Login Register Wishes Forum About
Language Reference » pCache functions » isInCache
Help topics
Latest updates
4693d  replaceImageMapTitle
4693d  replaceImageMapValues
4693d  createFunctionSerie
4693d  setAbsicssaPosition
4693d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
isInCache - Test if an object is already cached

This function allows you to check if an object is already in the cache. It can also returns detailled informations about the cached entry if any.

Calling this function

ID is the unique ID of the cached object.
Verbose if set to yes, this will returns some extended informations about the cached entry.

If Verbose is kept to FALSE, this function will either returns TRUE if the object is cached or FALSE if its not present in the cahe. If Verbose is set to TRUE, this function will return an array containing :

DBPos : The position of the picture in the solid database.
PicSize : The size of the picture.
GeneratedTS : The timestamp when the object has been pushed to the cache.
Hits : The number of times the object has been pulled off the cache.

Sample script

 /* Include all the classes */ 

 /* Create your dataset object */ 
 $myData = new pData(); 
 /* Add data in your dataset */ 

 /* Create the cache object */
 $myCache = new pCache();

 /* Compute the hash linked to the chart data */
 $ID = $myCache->getHash($myData);

 /* Display the informations about the cached entry */
This will returns an array :
    [DBPos] => 0
    [PicSize] => 7202
    [GeneratedTS] => 1282652176
    [Hits] => 4
Last updated on 08/24/2010 
by Jean-Damien 
Linked resources
Community comments
  No comments have been posted yet.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 415 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.