[silva-dev] RE: caching for file and image assets

Jose Chaso jose.chaso at zeux.info
Sat Jul 5 11:10:54 CEST 2003


> New submission from Martijn Faassen <faassen at infrae.com>:
> It should be possible to at least set HTTP cache headers for File and
> Image assets in Silva, perhaps from the UI. It would also be useful
> to explore how to integrate Zope's RAM caching with Silva.

Hi Martijn, and all the good silva people.

I have been playing around with Zope's RAM Cache Manager for a time.
There are various cases of interest I have found out:
1.- Static Content: objects can be nicely cached (this seems obvious to
everyone I think)
2.- Soft Dinamic Content: objects that didn't need to be shown freshly
up to date can be cached too, because if you set to 30 minutes (for
example) the cache refreshing interval, the user doesn't appreciate the
caching fact. (I think this cases are very unusual, but they can exist.
Think about news published at a web page. It doesn't matter if the news
gets served from the cache with 30 minutes of delay, except if you are
building the CNN's web page ;)
3.-  Hard Dinamic Content: I mean objects that must be served freshly
out of the disk every time. They cannot be cached in anyway. Because we
want that a silva user editing a doc to see every change done at the
same moment it is committed.

Until now the thing is obvious I think. But what I want to remark has to
be with internationalization, as you have suspected guys ;)

Internationalization can convert nearly every object in Hard Dinamic,
because we want every page served in multiple languages. This is because
we dont have different instances of the objects for each language. The
object is the same, and it gets internationalized on the fly, depending
on the User's Language Environtment Settings at his web browser.=20

Example: If one user asks for an internationalized object and he uses
German Language Environment, the object gets cached in german.
Until the cache regeneration, this object will be served in german,
independently of the user's Language Environment Settings, and this can
due to pages with parts in various languages and this is not a good
think. I am sure of this.

-- 
Regards

Jose Chaso




More information about the silva-dev mailing list