This document describes the current stable version of Celery (5.6). For development docs, go here.

# `celery.backends.cache`

Memcached and in-memory cache result backend.

class celery.backends.cache.CacheBackend(app, expires=None, backend=None, options=None, url=None, **kwargs)

  Cache result backend.

  as_uri(*args, **kwargs)

    Return the backend as an URI.

    This properly handles the case of multiple servers.

  property client
  delete(key)
  expire(key, value)
  get(key)
  implements_incr = True
  incr(key)
  mget(keys)
  servers = None
  set(key, value)
  supports_autoexpire = True

    If true the backend must automatically expire results. The daily backend_cleanup periodic task won’t be triggered in this case.

  supports_native_join = True

    If true the backend must implement `get_many()`.