Re: [Zope] Newbie question: http-cache, caching elements
hi eric, thanks so far. i knew about these two possibilities. i would like to use the http-cache. the problem is that i don't know how to cache single elements instead of completly parsed pages. regards, fernando
Hi fernando
does anyone know how to cache objects like gifs by a http-cache? my problem is that i have a navigation (constructed via tables) that is set up and changes dynamically every time a link is hit. this table includes a small picture. i think with the standard http-cache i can only cache "finished" html sites. therefore the picture is loaded every time i click on links that have not been clicked on before. i would like to cache this special element explicetly. can it be done?
There are two types of cache mangers in Zope:
The 'Accelerated HTTP Cache Manager' and the 'RAM Cache Manager':
The first one sets special HTTP headers to help proxies (e.g. web browser or squid) to cache your pages, images, etc. properly. This is the one you should use to cache your picture.
The RAM Cache Manager caches finally rendered objects/pages in your computer memory to speed up presentation at cost of memory usage.
Bye, Eric
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Fernando, Fernando Fuente wrote:
thanks so far. i knew about these two possibilities. i would like to use the http-cache. the problem is that i don't know how to cache single elements instead of completly parsed pages.
Once again there are two way to do this. If you already have created a cache manager: 1. If you have to associate several objects with your cache manager go its 'Associate' view. Here you can view the object already associated with the manager or choose new ones. You'd probably want to select 'Image' as object type and click 'Locate'. Now you can check all the objects you'd like to be cached and finally press 'Save changes' 2. Go to the object/image (which has to be in the cache manager's aquisition path). Select the object's Cache tab now and choose the cache manager which should cache the object/image under 'Cache this object using'. Click on 'Save Changes' to associate it with the cache manager. Now I'm sure you can get it. Greetings, Eric
sorry for asking again, i tried the http-cache. still doesn't work ;(. what i want to achieve is that when this image is cached once is shall be taken from the cache when opening a new site which has not been viewed before but includes this image.... cheers, fernando ----- Original Message ----- From: "E. Seifert" <e.seifert@gmx.net> To: "Fernando Fuente" <f.fuente@gmx.net> Cc: <zope@zope.org> Sent: Sunday, May 27, 2001 10:08 AM Subject: Re: [Zope] Newbie question: http-cache, caching elements
Hi Fernando,
Fernando Fuente wrote:
thanks so far. i knew about these two possibilities. i would like to use the http-cache. the problem is that i don't know how to cache single elements instead of completly parsed pages.
Once again there are two way to do this. If you already have created a cache manager:
1. If you have to associate several objects with your cache manager go its 'Associate' view. Here you can view the object already associated with the manager or choose new ones. You'd probably want to select 'Image' as object type and click 'Locate'. Now you can check all the objects you'd like to be cached and finally press 'Save changes'
2. Go to the object/image (which has to be in the cache manager's aquisition path). Select the object's Cache tab now and choose the cache manager which should cache the object/image under 'Cache this object using'. Click on 'Save Changes' to associate it with the cache manager.
Now I'm sure you can get it.
Greetings, Eric
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Fernando, Fernando Fuente wrote:
sorry for asking again,
No problem. That's why this list exists.
i tried the http-cache. still doesn't work ;(. what i want to achieve is that when this image is cached once is shall be taken from the cache when opening a new site which has not been viewed before but includes this image....
Normally the http cache should work. Be sure your browser is configured right. It does all the caching: Usually you can set the caching settings of your browser to values like 'check at every access', 'check once per session', or 'check never'. If your settings are 'check at every access' then the browser will probably check for a new version of the image in spite of the http headers he receives from Zope. Perhaps someone else has another idea. Regards Eric
participants (2)
-
E. Seifert -
Fernando Fuente