ObjectCache icon indicating copy to clipboard operation
ObjectCache copied to clipboard

Make project Android independent. Switch to RxJava

Open naixx opened this issue 11 years ago • 2 comments

There is question about SoftCachedObject and its usefullness

naixx avatar Jul 14 '14 21:07 naixx

The purpose of SoftCachedObject is to signify to the "client" that they are getting back the object, but it's expired so this is their last chance to refresh it.

I added it to fulfill the specific example in an application I'm using this library in where we cache the current logged in user, and then periodically poll the API to refresh all of their information (in case they changed their avatar or something). So, we need SoftCachedObject as a moment-of-no-return to fetch their user id and re-retrieve that model from the API.

iainconnor avatar Jul 14 '14 22:07 iainconnor

So, one method returns two types of objects? Wouldn't it be better to have separate method to check and explicitly return object of type T?

naixx avatar Jul 16 '14 13:07 naixx