Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make project Android independent. Switch to RxJava #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

naixx
Copy link

@naixx naixx commented Jul 14, 2014

There is question about SoftCachedObject and its usefullness

@iainconnor
Copy link
Owner

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.

@naixx
Copy link
Author

naixx commented Jul 16, 2014

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants