[SOLVED] Have to empty cache after making changes to site
[SOLVED] Have to empty cache after making changes to site
Hello all
I've been having a small problem with a CMSms site I've been working on for a while. Every time I edit a template, the CSS or any kind of content, I have to click 'clear cache' to get the changes to take effect.
This has happened under various versions of the CMS as I've been working on the site; the current version installed is 1.7. I don't have this problem on any of my other CMSms sites.
The solution is possibly just something simple (to do with the initial installation? An incorrect setting somewhere?) but it's had me baffled for a few months.
Any help or suggestions gratefully appreciated!
Thanks
Paul
I've been having a small problem with a CMSms site I've been working on for a while. Every time I edit a template, the CSS or any kind of content, I have to click 'clear cache' to get the changes to take effect.
This has happened under various versions of the CMS as I've been working on the site; the current version installed is 1.7. I don't have this problem on any of my other CMSms sites.
The solution is possibly just something simple (to do with the initial installation? An incorrect setting somewhere?) but it's had me baffled for a few months.
Any help or suggestions gratefully appreciated!
Thanks
Paul
Last edited by Paul J on Thu Apr 01, 2010 8:07 pm, edited 1 time in total.
Re: Have to empty cache after making changes to site
Thou you'd have to change and pull script for your needs...
http://forum.cmsmadesimple.org/index.ph ... _next=next ***edit << it should be noted that this was from google... we need to address this I'd think.. ****
http://forum.cmsmadesimple.org/index.php?topic=27171.30
What you could do is make a UDT with the clear script call and set that udt on the events... like edit and create content...
Hope this helps Cheers -Jeremy
http://forum.cmsmadesimple.org/index.ph ... _next=next ***edit << it should be noted that this was from google... we need to address this I'd think.. ****
http://forum.cmsmadesimple.org/index.php?topic=27171.30
What you could do is make a UDT with the clear script call and set that udt on the events... like edit and create content...
Hope this helps Cheers -Jeremy
Last edited by JeremyBASS on Tue Mar 30, 2010 9:24 pm, edited 1 time in total.
Re: Have to empty cache after making changes to site
Thanks for your quick reply, Jeremy. That's a bit more complicated than I was perhaps expecting, so will have to have a good look at it all when I have a little more time.
Thanks again
Paul
Thanks again
Paul
Re: Have to empty cache after making changes to site
Extentions >> User Defined Tags
Create a User Defined Tag called f.i. clear_cache with the content:
Extentions >> Event Manager
Call the UDT on an event.
In your case probably: ContentEditPost - Sent after edits to content are saved
Hope this helps.
Regards, Rolf
Create a User Defined Tag called f.i. clear_cache with the content:
Code: Select all
// Cut out of file: admin/siteprefs.php
{
global $gCms;
$contentops =& $gCms->GetContentOperations();
$contentops->ClearCache();
// $message .= lang('cachecleared');
}
Call the UDT on an event.
In your case probably: ContentEditPost - Sent after edits to content are saved
Hope this helps.
Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Have to empty cache after making changes to site
yep that is what I was suggesting to pull out of that link.. But it should be noted in the UDT just copy and paste
I should also be noted that you will see a bump in the time it takes to post.. Just FYI
glad Rolf had the moment to get that, I was so rushed
Cheers -Jeremy
Code: Select all
global $gCms;
$contentops =& $gCms->GetContentOperations();
$contentops->ClearCache();
glad Rolf had the moment to get that, I was so rushed

Re: Have to empty cache after making changes to site
Rolf: dank je wel! 
Jeremy: thanks again!
I have to go out now but will try what you suggest later today and will report back.
Thanks
Paul

Jeremy: thanks again!
I have to go out now but will try what you suggest later today and will report back.
Thanks
Paul
Re: Have to empty cache after making changes to site
It works! Many thanks to both of you! 
I wonder why the cache needed to be emptied to view changes on this site, when I have two other CMS made simple sites on the same host (different accounts though) where the content is updated straight away?
Anyway, thanks again!

I didn't notice much of a delay, but it doesn't matter too much as I'll be handing this site over to the client soon. This is a much better solution than having him emptying the cache after every edit.JeremyBASS wrote:
I should also be noted that you will see a bump in the time it takes to post.. Just FYI
I wonder why the cache needed to be emptied to view changes on this site, when I have two other CMS made simple sites on the same host (different accounts though) where the content is updated straight away?

Anyway, thanks again!

-
- Forum Members
- Posts: 127
- Joined: Fri Nov 28, 2008 10:28 pm
Re: [SOLVED] Have to empty cache after making changes to site
Is this save to keep that tag in? I can't notice any speed differences when loading pages.
Would be possible to have a tag that it clear the cache once a week?
Andrew
Would be possible to have a tag that it clear the cache once a week?
Andrew
Re: [SOLVED] Have to empty cache after making changes to site
They're 755. I've just checked my other sites on the same host, where I didn't have the cache problem, and they're the same. Hope that helps?Dr.CSS wrote: I would be interested to see what the permissions on tmp, tmp/cache and tmp/templates_c folders are set to...
-
- Forum Members
- Posts: 36
- Joined: Sat Jun 27, 2009 10:52 am
Re: [SOLVED] Have to empty cache after making changes to site
Hi dear Rolf
How we can clear cache (tmp) every time a visitor cames & openning the web site or web page from search systems
best regards!
How we can clear cache (tmp) every time a visitor cames & openning the web site or web page from search systems
best regards!
Re: [SOLVED] Have to empty cache after making changes to site
If you call the {clear_cache} tag in the Event Manager in f.e. ContentPostRender (Sent before the combined html is sent to the browser) it should do the trick.spiriralph wrote: How we can clear cache (tmp) every time a visitor cames & openning the web site or web page from search systems
®olf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -