Open cehwitham opened 11 years ago
So this is what I'm running into. +1000
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 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 :)
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?
Hopefully fixed by #73
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.