How to clear the image cache for a theme

How to clear the image cache for a theme

by Steve Cooke -
Number of replies: 9

Hi all,

How do I clear the image cache in Moodle please?  I have altered a background image for a theme, and although the original image no longer exists in my Moodle instance, the original image is still being displayed. Image.php presents the cache.  I understand why a cache may be required - but this is an occasion where it is a nuisance.

Kind regards,

Steve Cooke

(Edited by A. T. Wyatt - original submission Friday, 3 February 2012, 07:44 AM.  Moved to themes forum on 4/24/12)

Average of ratings: -
In reply to Steve Cooke

Re: How to clear the image cache for a theme

by Itamar Tzadok -

See reply to your cross posting. smile

In reply to Itamar Tzadok

Re: How to clear the image cache for a theme

by Chris Davis -

perhaps you could link to that cross post for those of us who find this via google search 

Average of ratings: Useful (1)
In reply to Chris Davis

Re: How to clear the image cache for a theme

by Chris Davis -

nm

for those who need it. go here: http://docs.moodle.org/22/en/Cache 

Typo Alert! smile
(Edited by Mary Evans - original submission Sunday, 15 April 2012, 01:34 PM)

In reply to Chris Davis

Re: How to clear the image cache for a theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Theme designers use Theme Designer Mode found in Site Admin > Appearance > Themes > Theme settings page. When this is enabled you don't have to go hunting for 'Purge all cache' or 'Theme cache' as all the cache is clears on browser refresh, which is great while working on a theme. You can't really do that in a production site as it slows the site down too much, so go for the next best option which is Purge all caches.

Site Admin > Development > Purge all caches

It's good to know that if you enable Debugging in Site Admin > Development > Debugging, you actually get a link to Purge all caches, in the footer, by default.

Also...a trick I use, is to have Purge all caches "Bookmarked" in your Admin bookmarks.

Hope this helps

Cheers

Mary

Average of ratings: Useful (2)
In reply to Mary Evans

Re: How to clear the image cache for a theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

As an addition to what Mary has said - I sometimes put the Purge All caches link in my custommenu while I'm working: Currently I'm doing a lot with a settings page which needs changes to the language file and I've found that this needs to be cleared with the purge all cache as even the theme designer mode doesn't clear that cache smile

Rich

In reply to Richard Oelmann

Re: How to clear the image cache for a theme

by Miriam Laidlaw -
Picture of Plugin developers

Will turning off language string caching help with that?

Site admin > Language > Language settings

Average of ratings: Useful (1)
In reply to Miriam Laidlaw

Re: How to clear the image cache for a theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Yes it does Miriam - I found that after I'd been doing it for a day or two and then remembered that option from when I did the original flexi theme big grin but my main point was just to add simply to Mary's options about where to find the Purge All Caches option and that I sometimes add the link to my custommenu.

Rich

In reply to Richard Oelmann

Re: How to clear the image cache for a theme

by Derek Chirnside -

I'm wondering if there is benefit to put the "Clear theme caches" button in all places in admin where it may be useful, for example in the themes page where you can add custom CSS.

-Derek