Hi! On 04/16/2008 10:46 PM Gaetano Giunta wrote: > Thomas Nunninger a écrit : >> Hi,
>>>>> I see your problem. However, you should not cache PDF files in >>>>> memory anyway, but store them somewhere as PDF files and link to >>>>> them. Reading a 100 MB PDF through PHP is overhead in itself, so >>>>> you would not want to use Cache here anyway. >>>> That's just your opinion on this, and perhaps there's other content >>>> for which this does make sense. >>> I don't think so. It's commen sense in the PHP world to store such >>> ammounts of pseudo-static data on disc and let the webserver do what >>> he does best: Serve content. Even starting PHP in this case does not >>> make sense, since it slows down the whole process significantly. >> In most cases I agree. But what if you need strict permission checking >> (e.g. paid content or privacy reasons)? How should the webserver know >> about the user and his permissions? > I don't know if it really means anything to caching, but there are > interesting options to apply permission checks in php then let the > webserver handle content delivery, at least with apache: mod_sendfile > for one, and an upcoming mod_authz_dbd. > Hey: maybe we should go for a mod_authz_ezp??? Yes, there are several webserver features that assist you with this problem: Lighttpd has the very nice mod_secure_download [1] module. Both, Lighttpd [2] and Apache [3] provide a module for the X-Sendfile header that can also help you to solve this problems very easy and much more efficient than any PHP based caching method can do. [1] http://trac.lighttpd.net/trac/wiki/Docs%3AModSecDownload [2] http://blog.lighttpd.net/articles/2006/07/02/x-sendfile [3] http://tn123.ath.cx/mod_xsendfile/ HTH, Toby -- Mit freundlichen Grüßen / Med vennlig hilsen / With kind regards Tobias Schlitt (GPG: 0xC462BC14) eZ Components Developer [EMAIL PROTECTED] | eZ Systems AS | ez.no -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
