[horde] Garbage collection /static directory

Arjen de Korte arjen+horde at de-korte.org
Thu Mar 10 12:10:54 UTC 2016


Citeren Jan Schneider <jan at horde.org>:

> Zitat von Arjen de Korte <arjen+horde at de-korte.org>:
>
>> I'm not sure if this ever worked, but it looks like garbage  
>> collection for the /static directory when CSS and Javascript cache  
>> is place is not working here. Looking at
>>
>>    horde/framework/Core/lib/Horde/Themes/Css/Cache/File.php
>>    horde/framework/Core/lib/Horde/Script/Cache/File.php
>>
>> there should be a 'gc_cachecss' and 'gc_cachejs' file in the  
>> /static directory respectively to prevent running the GC more than  
>> once a day. As far as I can see, this file should be created the  
>> first time the GC runs. However, neither of them is present and the  
>> cached theme CSS and Javascript files date back many months.
>>
>> I'm running Horde_Core-2.22.6. Did I miss configuring something  
>> that keeps Horde from GC the /static directory?
>
> Please create a bug ticket.

https://bugs.horde.org/ticket/14285

In hindsight, I would like to suggest a slightly smarter way do deal  
with the garbage collection in the /static directory. The  
cached/minified *.js and *.css files should always be newer than their  
source files. When using the Google closure compiler, this is easily  
checked for the *.js files because the source files are listed at the  
end. So instead of removing them after a certain number of  
seconds/days, it would be enough to check if they are newer than the  
sources they are derived from. Something similar could be done for the  
*.css files.



More information about the horde mailing list