Michael Jurisch wrote:
Hi!

You probably need to explain why you want to do this.  For example - why
would you need to change the file permissions?  If squid created the
file in the cache, it can read it back - why would you want to change
the permissions?

Ok, I try to keep it short:
We want to deliever specific content via the proxy, so that the original server 
hasn't to handle all the load. But we also want that a web editor can decide, 
that a certain file will be deleted from the cache within seconds manually and 
also lock (change file permission) the files, which means the file should 
remain in cache, but surfers can't access them (= stoping delivering the 
content). That later one was just a thought of mine, I want to test whether it 
works or not.

In the end we want to have a web front end for customers who can easily do that 
things describe above.


Riiight.... well the first bit is possible.

Seeing as your system knows which file is now obsolete you can use any of the the cache-manager systems to drop individual URI out of the cache. Next request squid will fetch from the authoritative server again as per normal.

Altering the cache directly is NOT recommended. Squid is not guaranteed to use the same filing system in two given cache-dirs and not all squid fs match OS fs. If a file is altered in-cache it may cause serious problems.

'Locking' of files like that makes no sense in HTTP. Either a URI is available or its dead. If you are really wanting an archive of old content you should be looking elsewhere than the web proxy. You're better off locking it on the origin server fs and following the same procedure on the proxy as for changed files.

Amos

Reply via email to