Re: Aktualisieren sich Volatiles in Object Caches?

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization ZOPYX Ltd & Co. KG
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Zechmeister wrote:
>> Was genau hast Du vor? - -aj
>
> def ichKannVielZeitBrauchen(self, R): foo = getattr(self, '_v_foo',
> None) if foo\ and REQUEST.get('HTTP_CACHE_CONTROL','') !=
> 'no-cache': return foo
>
> # Das braucht viel Zeit: ... foo = Ergebnis von dem, was viel Zeit
> braucht self._v_foo = foo return foo
>
> Es wird also etwas Aufwändiges in _v_foo gespeichert. Falls aber
> _v_foo gestorben ist, wirds neu erzeugt. Zusätzlich wird noch
> geprüft, ob ein User einen Browser-Force-Reload verlangt. Dann wird
> auch neu erzeugt. Das kann gewünscht sein, falls sich der
> Datenbestand, den foo verwendet geändert hat.
>
> Es funktioniert so. Nur hab ich noch nicht sicher rausgekriegt, ob
> das nur in dem einen Ram-Object-Cache bleibt, oder sich
> automatisch ausbreitet. Nach euren Meinungen in diesem Thread,
> breitet es sich nicht automatisch aus.
>
> Wenn es sich nicht automatisch herumspricht, muss für jeden
> Object-Cache bei Bedarf einzeln wieder neu generiert werden und
> weiters kann es zu unterschiedlichen Zuständen in den Caches
> kommen, wenn sich der Datenbestand ändert, weil ein Force-Reload ja
> dann auch immer nur einen Cache betrifft.
>
> Ram-Cache-Manager verhalten sich aber afaik genau so. Also nicht
> thread/ZEO-übergreifend.
>
> Alternative wäre, das persistent zu machen, aber dann schreibe ich
> ja unnötig viel in die DB?
Sieht für mich so aus als wärest Du mit gocept.cache, plone.memoize oder
etwas ähnlichem besser bedient?!

Andreas

- -- 
ZOPYX Limited              \ zopyx group
Charlottenstr. 37/1         \ The full-service network for your
D-72070 Tübingen             \ Python, Zope and Plone projects
www.zopyx.com, [email protected] \ www.zopyxgroup.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuYwTQACgkQCJIWIbr9KYyVOgCg50TW1orJ80t82mIw5dD6d2+Z
BEAAoNKs+q23MtpEEttZGdZCoWeDw9ds
=4JO1
-----END PGP SIGNATURE-----



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lists.vcf (text/x-vcard, 331 B)
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.