Values are pickled surprisingly complicated

Issue #12 open
Hynek Cernoch
created an issue

I looked into cache contents and I see that all objects are wrapped by keyedcache.CacheWrapper object and then pickled by Django.core.cache.
For example the integer 5 is saved like

# by keyedcache
# directly by Django cache

There are seen unimportant identifiers ['keyedcache', 'CacheWrapper', 'inprocess', 'val'] in every value.

I wrote a documantation to unclear parts and now I think that keyedcache can be easy modified to be more transparent if a known value is cached and will be complicated only if a Function Caching "in process" is used.

Comments (4)

  1. Hynek Cernoch reporter

    The removed Cache prefix is automatically handled by Django. It is not a necessary part of Keyedcache. An additional automatic preffix can be useful with threaded multihost because any static value is not useful for it.

    The method cache_enable is never used by Satchmo. I expect it useful only for testing purposes. (The current simple implementation can cause problems in other modules or with obsoleted values. The cache can be easy disabled globally by settings.CACHES.)

  2. Log in to comment