How to LScache JS & CSS files?

#1
Even though LScache is enabled, it only seems to affect dynamic files (CFM) and HTML files.
How do I set it to also cache JS, CSS & image files? Is there a setting for it I missed?
My cache settings (Server settings -> Modules):

checkPrivateCache 1
checkPublicCache 1
maxCacheObjSize 10000000
maxStaleAge 200
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0

enableCache 1
expireInSeconds 3600
enablePrivateCache 1
privateExpireInSeconds 3600
 

Cold-Egg

Administrator
#2
Cache static file is not recommended on the Web Server side since the load is fast enough, it is better to do it when you are using CDN.
 
#3
Noted. Alas, cached static files trough (basic) CDN services are significantly slower than same, non-cached JS/CSS/image files served directly from OLS w.s.
While these CDN services might have higher tiers of subscription that can prioritize their caching for you, if one would be inclined to implement caching of static files directly from OLS, how would one proceed? Is it possible at the moment?
 

LiteCache

Active Member
#4
Noted. Alas, cached static files trough (basic) CDN services are significantly slower than same, non-cached JS/CSS/image files served directly from OLS w.s.
This cannot be generalized. Caching static sources using a CDN is neither generally slower nor generally faster. If the origin host is in the same country as the client, then the download via CDN is slower. If the client is located in another country, a CDN is faster in any case.

From this you can conclude that a CDN only makes sense if the majority of visitors to your site come from another country. Otherwise, a CDN will have more disadvantages than advantages.

While these CDN services might have higher tiers of subscription that can prioritize their caching for you, if one would be inclined to implement caching of static files directly from OLS, how would one proceed? Is it possible at the moment?
The basic idea of a page cache like LScache or any other page cache is to turn a dynamically generated source into a static source. This reduces loading times considerably because neither PHP nor MySQL need to be executed. Caching a classic static source (images, css, js,...) on a server makes no sense because these static sources are cached by the browser. Therefore, caching static sources only makes sense when using a CDN, but with the aforementioned restriction.
 
Top