Forum OpenACS Development: Re: caching files

Collapse
5: Re: caching files (response to 4)
Posted by Malte Sussdorff on
That is great. Sadly now we are running into the problem (on the caching server) which caused us not to use one big directory for the CR in the first place: We run out of directory names 😊. Therefore I was thinking to use /file-cache.vuh which is called like /file-cache/$content/${filename} where content is the path to the file in the content repository. Then create a new parameter "behind caching server" and if set to "yes" both image.vuh and file.vuh would redirect to /file-cache and we are "fine". As discussed in IRC we need to make sure that the caching server does not allow access to /file-cache.vuh directly and that the files are only served if permission is given. https://openacs.org/forums/message-view?message_id=1163926 is a good description on how to do this with NGINX, which is similar to the X-Sendfile statement http://blog.lighttpd.net/articles/2006/07/02/x-sendfile.