Utils Storage

inyoka.utils.storage

Dict like interface to the portal.storage model.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

class inyoka.utils.storage.CachedStorage

This is a dict like interface for the Storage model from the portal. It’s used to store cached values also in the database.

_update_cache(key, value, timeout=None)
get(key, *args, **kwargs)
get_lazy(*args, **kwargs)
get_many(keys, timeout=None)

Get many cached values with just one cache hit or database query.

set(key, value, timeout=None)

Set key with value and if needed with a timeout.