Grab all files from the CSS & JS directory, gzip and dump into the cache dir if just enabled. Also clear it when it is disabled.

Comments

EvanDonovan’s picture

Would this make it so Boost .html would still show up OK even if the CSS & JS files no longer exist? I still have had problems with that on 1.0-beta2 (will install 1.0 tomorrow).

I haven't been able to get the .htaccess rewrite to work though, I believe, because of our use of Lighttpd to serve CSS & JS. We also have a module installed called Referer Tools that changes theme based on HTTP Referer. I had to hack the module to not change if a referer theme is set.

mikeytown2’s picture

No, this would grab all files in the files/css and files/js directories and copy them into the cache/.../files/.. dir. If it wasn't working for you before, it still wont work for you after. This would be useful for someone who had css/js caching disabled, and then enables it and runs something that clears the css/js files and wonders why their cached pages dont display correctly.

To fix your issue, it sounds like you need to copy the cached files back into the files/css and files/js directories, or convert these rules to lighttpd for js/css.

  # NORMAL - Cached css & js files
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]
EvanDonovan’s picture

Title: Retro Active CSS/JS cache » Retroactive CSS/JS cache

Yes, I think I need to convert those rules to Lighty, but I would probably have to enable mod_magnet to do that. I'll have to think more about what the best solution for me would be.

Now I understand what you mean in this issue - thanks for the explanation. The proofreader in me has changed the title to "Retroactive" though :)

mikeytown2’s picture

Status: Active » Postponed

Idea's here; don't think anyone needs this though.

bgm’s picture

Status: Postponed » Closed (won't fix)

Old issue cleanup.