Skip to content

Design/TST/REF clear cache after results.__init__ #2417

Open

Description

@josef-pkt

related to adding more consistency and "discipline" in creating results instances, with a view on being able to recreate results instances.

Putting values directly into the _cache was a backdoor that I used a few times in experimental scripts.
We need unit tests to check that this doesn't happen in our actual code.

Maybe we should get an internal _clear_cache method, since _cache is in most cases not just a dictionary where we could just do results_cache = {}

Activity

  1. josef-pkt commented on Dec 5, 2016

    @josef-pkt
    MemberAuthor

    another suggestion: an official clear_cache(attr) with attr is attribute or list of attributes to allow users to remove selectively items from cache that might be too large for the given usecase.
    This would be without reducing the functionality (if everything works as intended) because cached items can be recomputed.

  2. added this to the 0.14 milestone on Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions