mhgbrown / cached_resource

Caching for ActiveResource
MIT License
80 stars 28 forks source link

single cache invalidation #16

Closed sirwolfgang closed 2 years ago

sirwolfgang commented 10 years ago

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.

mhgbrown commented 10 years ago

Nice idea. I think this would be a nice inclusion.

sirwolfgang commented 10 years ago

I am running into a case where I could really use it. Just not sure if I got time to make it happen atm... :|

mhgbrown commented 10 years ago

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.

sirwolfgang commented 10 years ago

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...

sirwolfgang commented 10 years ago

The test pass now, it had to do with the way I was setting on the collection array. The issue now is handling collections.

mhgbrown commented 10 years ago

Have you made any progress towards resolving the above mentioned issues?

mhgbrown commented 2 years ago

Fixed by https://github.com/mhgbrown/cached_resource/pull/49

mhgbrown commented 2 years ago

https://rubygems.org/gems/cached_resource/versions/5.2.0