Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use build_key(key, namespace) consistently across modules and classes #570

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Apr 24, 2022

  1. Decorator creates cache with Cache() constructor

    * See aio-libs#473: Deprecate using cache specific constructors
      * aio-libs#473
      * `Cache` class was introduced as a proxy for instantiating the different
        backends. There should be only one way of doing things and `Cache` is
        the preferred way of doing that so will deprecate the others.
    * This is now applied to `cached._get_cache()`
    padraic-shafer committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    e32dc81 View commit details
    Browse the repository at this point in the history
  2. Use namespace for decorators get/set

    * Include build_key(key, namespace) in decorators.cached:
        * get_from_cache()
        * set_in_cache()
    padraic-shafer committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    3f2137c View commit details
    Browse the repository at this point in the history
  3. Use namespace for HitMissRatioPlugin key

    * Use namespace, if available, to build key that is passed
      to plugins.HitMissRatioPlugin.post_get()
    padraic-shafer committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    c47f119 View commit details
    Browse the repository at this point in the history
  4. Introduce key_filter for confirming key is in namespace

    * `BaseCache.key_filter(key, namespace)` returns True
      if key is in the namespace
    * `backends.memory.SimpleMemoryBackend` uses this to seleectively
      clear its cache for the given namespace
    padraic-shafer committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    4559b23 View commit details
    Browse the repository at this point in the history