Serious problem with caching with multiple mongrels?

Hi

I ran into what seemed to be a very serious problem with the way
caching works. However it seems so serious that I wonder if I’m
missing something very obvious !

Essentially if you use a filestore and a fragment cache with multiple
mongrels and named routes you get key names like :

/path/to/cache/128.0.0.1.8000/users/json
/path/to/cache/128.0.0.1.8001/users/json
/path/to/cache/128.0.0.1.8003/users/json

Notice that different mongrels get a different directory. This is
because fragment key is calculated with “url_for”.

The problem with this is obvious, since the fragments are not
application wide and it depends which mongrel server the request is on
to which folder it will look in.

I managed to fix it by using a string rather than a named route, but
I’m still fairly confused. I wonder whether its a feature, but I can’t
see what it would be useful for!

Jonah

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs