A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pydanny/cached-property/issues/16 below:

can't clear cached properties · Issue #16 · pydanny/cached-property · GitHub

Hi

I've using cached_property since 0.1.5 - I see it's now declared 1.0.0 - I'm using it with python 2.7.8

Well I had some regressions since I started using 1.0.0 - I can't seem to invalidate the cache - either through the way listed on pypy:

or the old tried and true way which worked when the data was not cached yet:

try:
     delattr(instance, pname)
except AttributeError:
     pass

As of right now, the only way I could get it to invalidate the cached entries, whether or not they are populated is this:

     try:
        del instance._cache[pname]
    except KeyError as e:
         pass

To be clear I haven't been able to clear the cache at all in any other way than the above direct mangling with _cache.

Is this a regression on your side? Is the documentation up to date with how you expect to clear the cache?

I think with something this big, if valid, needs to have the pypy package updated asap!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4