resourceloader: Set a TTL for minification cache entries
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 7 Jul 2015 16:40:00 +0000 (17:40 +0100)
committerOri.livneh <ori@wikimedia.org>
Tue, 7 Jul 2015 17:15:37 +0000 (17:15 +0000)
commitbdb4a243eabbbb7d0a29e99fd8ef341d37c8d9e7
treee78629087c7cab0c6b58a161b75fa0901541f489
parent1224a70009542dc72d371978fd7ba7195206a852
resourceloader: Set a TTL for minification cache entries

Follows-up 458e7cabbbafd. HHVM's APC cache doesn't have any
limitation or eviction logic. Thus entries without a TTL will
linger indefinitely.

At time of writing over 99% of APC entries were from "resourceloader:filter"
because there are far more unpopular resources than popular ones.

A fixed TTL is suboptimal as it will also cause popular resources
(e.g. startup module, or jquery) to be re-minified every day.

Beware this isn't one single minification. It's one minification,
for every JS/CSS resource, on every app server, for many different
lang/skin/config variations.

Bug: T104769
Change-Id: Ib62c320da0eeede68aad3f2294006ec7dcf1df55
includes/resourceloader/ResourceLoader.php