Re: Large(ish) scale pdf file cacheing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



George Wilson in php.general (Tue, 4 Mar 2014 11:46:53 -0800):
>On Tue, Mar 4, 2014 at 11:01 AM, Bastien Koert <phpster@xxxxxxxxx> wrote:
>
>> Use the filesystem and store each pdf on the file system
>>
>> you can use a cron to delete the files older than x
>
>Thanks for the suggestion- sounds like that might be the simplest approach.

I have got more or less the same problem. Less files (20.000), but
larger (200MB average). Far too much to store on the webserver itself.
They are video files, but that does not make the problem different.

When a user requests a file that is not on the production server, a
script fetches it from the archive (with 5TB storage). That takes half a
minute, but would in your case be some seconds.

The cron job that deletes files should not look at the creation time,
not at the last-modified time, but rather ar the time of last access (ls
-lu or PHP's fileatime). That way you will not delete files that are
requested very frequently, but only those that are requested once in a
while.

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux