Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cache refresh when switching themes #43

Open
cehwitham opened this issue Jul 22, 2013 · 6 comments
Open

Fix cache refresh when switching themes #43

cehwitham opened this issue Jul 22, 2013 · 6 comments

Comments

@cehwitham
Copy link

Using the code included in two different themes, switching between themes doesn't update the cache so the newly selected theme still displays using the old stylesheet.

@lkraav
Copy link

lkraav commented Oct 28, 2013

So this is what I'm running into. +1000

@lkraav
Copy link

lkraav commented Oct 28, 2013

Maybe the easiest way to not touch upstream code here is to filter get_cache_dir() to make stuff like "wp-less-" . basename( get_stylesheet_directory() ). Going to try this now.

@lkraav
Copy link

lkraav commented Oct 28, 2013

@roborourke
Copy link
Owner

@lkraav Hi Leo - sorry I'm just catching up with this. I should be able to invalidate the caches on the switch theme hook so that might work. Alternatively I could use a theme specific & site specific sub directory to add multisite support. Thanks for the ideas :)

@ansonphong
Copy link

Hi, I'm currently running into a similar issue and I'm looking for a way to run a callback function which would invalidate the CSS cache.

The context I'm working with is a Theme which is customizable from the WP Admin - so the user can change the background color for instance. After they save that new background color in the admin, it's using PHP to inject the variable with the 'less_vars' hook, but the cache isn't being updated until I make some edits to the LESS files.

Is there a simple callback I can run which invalidates the cache?

@roborourke
Copy link
Owner

Hopefully fixed by #73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants