Closed krlmlr closed 3 years ago
memoise()
identifies old-style caches by passing them to is_old_cache()
. It looks like that function is a bit too stringent for the cache you've defined:
x <- cache_attach(name = "test")
memoise:::is_old_cache(x)
#> [1] FALSE
In particular, it's looking for a $drop_key()
method, which cache_attach
doesn't have.
https://github.com/r-lib/memoise/blob/1e47c363786d560b41316bf749480433d42ca304/R/old_cache.R#L27-L34
I guess it might make sense to not check for $drop_key
, since it's not totally necessary for the memoise()
function to work.
How can we make this compatible with both versions of memoise?
1e47c363786d560b41316bf749480433d42ca304, current
Created on 2021-01-08 by the reprex package (v0.3.0)
83304eb0d42af699f0f974a4f161569e4a82916f, before cachem
Created on 2021-01-08 by the reprex package (v0.3.0)
CC @wch.