It is currently Fri Sep 03, 2010 12:50
  • View your posts
  • FAQ
  • Register
  • Login

  • All times are UTC + 1 hour [ DST ]



    Post new topic Reply to topic  [ 7 posts ] 
    Author Message
     Post subject: Clear cache (cron script)
    PostPosted: Thu Jan 15, 2009 16:45 
    Offline
     E-mail  Profile

    Joined: Sat Jun 14, 2008 20:24
    Posts: 11
    I found for some reason I have cacheing problems.

    To fix it I implemented a cron job to clear the cache.

    Extract this file to your cron directory, chmod 775 and set up a cron job. I run it every hour.

    Files here


    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Fri Jan 16, 2009 07:17 
    Offline
    GOD!
     Profile

    Joined: Wed Nov 26, 2008 13:35
    Posts: 1657
    I use a slightly different approach. I check the age of each file and delete it if it's older than a specified time. This way you can specify different caching periods and run the script more often than you actually delete. It's set to remove the sql and template caches at a day old but you can change that to suit your need.

    It requires php5 but would be easy to rewrite for php4 if it's needed. Setup is the same as above.


    Attachments:
    File comment: Script to delete old cache files
    cron_clearup.php.gz [638 Bytes]
    Downloaded 126 times
    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Tue Mar 03, 2009 00:11 
    Offline
    User avatar
     E-mail  Profile

    Joined: Sat Sep 20, 2008 01:32
    Posts: 190
    Location: EDK3.1:865
    Can someone make a memcached one of these, please? Damn thing gives me stale data all the time, but it's *so* fast.

    _________________
    Darkside Theme
    ISEE ED Killboard
    D.E.R.P


    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Wed Mar 25, 2009 03:56 
    Offline
    User avatar
     WWW  ICQ  Profile

    Joined: Thu Nov 06, 2008 10:36
    Posts: 69
    Location: germany
    any fix for the new revision?

    getting a:

    #!/usr/bin/php
    Fatal error: Class 'registry' not found in /myserver/common/includes/class.config.php on line 162

    since upgrade to rev 369

    _________________
    - Need a Mirror for a Release File? just ask.
    - Need help installing or upgrading a KB? just ask and we will work something for some isk out.


    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Wed Mar 25, 2009 08:29 
    Offline
    GOD!
     Profile

    Joined: Wed Nov 26, 2008 13:35
    Posts: 1657
    X treme wrote:
    any fix for the new revision?

    getting a:

    #!/usr/bin/php
    Fatal error: Class 'registry' not found in /myserver/common/includes/class.config.php on line 162

    since upgrade to rev 369

    try adding
    Code:
    require_once( "common/includes/class.registry.php" );

    after
    Code:
    require_once( "kbconfig.php" );


    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Wed Mar 25, 2009 23:24 
    Offline
    User avatar
     WWW  ICQ  Profile

    Joined: Thu Nov 06, 2008 10:36
    Posts: 69
    Location: germany
    ty looking good now ;)

    _________________
    - Need a Mirror for a Release File? just ask.
    - Need help installing or upgrading a KB? just ask and we will work something for some isk out.


    Top
     
     Post subject: Re: Clear cache (cron script)
    PostPosted: Wed Apr 08, 2009 11:51 
    Offline
     E-mail  Profile

    Joined: Thu Sep 04, 2008 15:38
    Posts: 130
    I tried use the script, but not running.

    Name: Cacheclearing URL: http://*** Nextrun: 2009-03-25 06:00:00
    State: not running ID: 4fb8fedf682550c3ba1d7f3ee323192d

    How i can do it to run state ?


    Top
     
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 7 posts ] 

    All times are UTC + 1 hour [ DST ]


    Who is online

    Users browsing this forum: underwoodr and 1 guest


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
    Style Designed By phpBBegypt