Closed sirwolfgang closed 2 years ago
Nice idea. I think this would be a nice inclusion.
I am running into a case where I could really use it. Just not sure if I got time to make it happen atm... :|
Yeah, I totally get it. The infamous time problem! I'm also pinched for time lately, but would be happy to work on it too.
Ok. I added the functionality on my fork. 5b57c46d31
Its missing tests atm. But more importantly a bunch of tests are now failing. I am not sure why...
The test pass now, it had to do with the way I was setting on the collection array. The issue now is handling collections.
clear_cache
on a solo item from a loaded collection, since It doesn't have a key
set to it.clear_cache
on a single item, it does not currently also clear_cache
on the collection call. And I can't assume the .all
call because my usage is using the extra key/hash values for uniqueness. Have you made any progress towards resolving the above mentioned issues?
Would be nice to have a way to call clear_cache on an instance, and have it clear the cache for that instance. That way the next time it is loaded, it will force a reload, rather then being reloaded now if don't need it.