Contents
Login Register Wishes Forum About
Language Reference » pCache functions » removeOlderThan
Help topics
Latest updates
2233d  replaceImageMapTitle
2233d  replaceImageMapValues
2233d  createFunctionSerie
2233d  setAbsicssaPosition
2233d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
removeOlderThan - Remove object based on their age

This function allows you to remove objects from the cache based on the date where they‘ve been generated. It can be used to flush all object that have been generated more than 24 hours ago if your application got dailly changes on the graphs layouts.

Calling this function
removeOlderThan($Expiry)

Expiry is an amount of seconds. Objects pushed in the cache with an age greated of this value will be removed.


Sample script

This will remove objects pushed more than one day ago.
 /* Include all the classes */ 
 include("class/pCache.class.php");

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

 /* Remove objects older than one day */
 $myCache->removeOlderThan(60*60*24);
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. 410 users have registered. This page has been rendered in 0,02 seconds. Wiki revision 1.37.