Jump to content
Sign in to follow this  
thorstone137

Less Compiled CSS Cache-control

Recommended Posts

thorstone137

Hello, Is there a way to set the cache-control for pagelines-compiled-css-$? Thanks!


Best Regards! Pagelines = Innovation!

Share this post


Link to post
Share on other sites
beardedavenger
Hey There, Can you be a bit more specific as to what you're trying to do? Nick

Something big is coming for DMS + photographers.

http://fotostheme.com

 

Nick Haskins & CO - New home for all of my PageLines Store products! 

http://nickhaskins.co

 

Better DMS - News, Tutorials, and Tips

http://betterdms.com

 

Share this post


Link to post
Share on other sites
thorstone137
Does pagelines 2.2 compile and cache less css? Yes or no? If it does, does it get cached? If it does, does get cached server side? Can I control how long? Can it be cached externally? Can i cintrol how long? Best regards, Dustin

Best Regards! Pagelines = Innovation!

Share this post


Link to post
Share on other sites
Rob
I don't believe specific files are cached uniquely. Caching usually handles the entire volume of the site. CDN may handle select types of files. Whatever caching system you use should have controls for duration of the caching, and the type of caching used determines if it's local or external.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
jordi
Changes made to style.less in the root child theme folder are not being applied inmediately. I removed the file from the server and the css styles where still being applied. There should be a way to clear that cache manually.

Jordi López Garrostas
programador web

Share this post


Link to post
Share on other sites
Danny
Hi Jordi, Is your issue now resolved ?

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
bxbmedia
The compiled LESS css is stored using the [url="http://codex.wordpress.org/Transients_API"]Transients API[/url]. These are like wordpress options except they expire after a defined period of time. The default expiration time for compiled less is 24 hours (developers please see below). So either the transient times out and then the less is recompiled on the next page load, or you can flush this cache. On the pagelines [url="http://demo.pagelines.com/framework/theming/"]Theming[/url] page, it says this: [quote]Tip:Disable the LESS caching system while working locally. Simpy add [code]define('PL_LESS_DEV',true);[/code] to your wp-config file, and this will turn off the caching system. DO NOT use this on a production rig, or you'll face a nuclear melt-down. You have been warned![/quote] This is not 100% accurate (not just about the nuclear melt-down part). The constant does not disable the caching system (at this point at least, perhaps things are in the works to be consistent with this statement in the future) but at current, it forces the LESS to be recompiled on every admin (backend) page load. So if this is set, all you have to do is reload/navigate to any admin page, (or if you just saved your options, that would work too) and that will recompile your LESS. It's worth noting, that if you get a parse error in your LESS when it's compiled that your site will serve up a backup version of your last good compiled less. If you have a parse error it will let you know with a big red button in your wp admin bar, though so it's obvious. Basically, if you have a parse error, you won't see your most recent changes even if you're forcing a recompiling of the less. @danny, @beardedavenger - About the problem I referenced above, please let the developers know that there is a typo in the __construct function of the [i]PageLinesRenderCSS[/i] class defined in [u]class.render.css.php[/u] [code]$this->ctimout = 86400;[/code] where the set_transient functions use [code]$this->ctimeout[/code] Thanks!

gl hf

Share this post


Link to post
Share on other sites
Simon
Thx for the heads up on the typo, and the explanations :) The PL_LESS_DEV does indeed flush the cache on every pageload, frontend and backend!

Share this post


Link to post
Share on other sites
bxbmedia
@pross - I stand corrected! I don't know how I missed the frontend call :/ I'm just curious - wouldn't a typo like that throw a php notice or something when the set_transient function is referencing a property that isn't set/defined in the class? Thanks!

gl hf

Share this post


Link to post
Share on other sites
Simon
No, because it was already declared as a var at the top of the class. ;)

Share this post


Link to post
Share on other sites
bxbmedia
@pross - ah yes :) So the ctimeout property would have been evaluated as 'null' and the function was using the default of 0 for the timeout? Thanks for your comments!

gl hf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×