Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Add an API to determine if a given data is in cache. #123

Closed
stephanenicolas opened this issue Jun 22, 2013 · 5 comments
Closed

Add an API to determine if a given data is in cache. #123

stephanenicolas opened this issue Jun 22, 2013 · 5 comments
Assignees
Milestone

Comments

@stephanenicolas
Copy link
Owner

No description provided.

@ghost ghost assigned stephanenicolas Jun 22, 2013
@stephanenicolas
Copy link
Owner Author

Commit 334dbac solved the issue. SpiceManager.isDataInCache has been added + tests.

A snapshot will be available in a few minutes on our snapshot repo.

@stephanenicolas
Copy link
Owner Author

Commit 0d32547 also adds getDateOfDataInCache.
Published on master branch. A snapshot is being redeployed.

@mcastets
Copy link

What's the point to specify a cacheExpiryDuration in the isDataInCache method?

Moreover, you should update the @return comment: @return the data has it has been saved by an ObjectPersister in cache. to something like @return true if the data has been found in cache

@mcastets
Copy link

In addition, there are some issues with getDateOfDataInCache

  • If there's no such cache key or after using removeDataFromCache(clazz, cacheKey), getDateOfDataInCache(clazz, cacheKey).get() returns Thu Jan 01 01:00:00 UTC+01:00 1970 instead of the expected null.
  • And also something very weird... After locking my phone screen and unlocking it, (going through the onStop() and onStart() process) I got a NullPointerException on running getDateOfDataInCache(clazz, cacheKey)
    Please take note that's happened prior to calling get()

@stephanenicolas
Copy link
Owner Author

Hi bobby,

Thanks for the feedback. I am actually in holidays. Please fill an issue on
our github board.

S.
Le 25 juin 2013 11:05, "Bobby-Jackson" notifications@github.com a écrit :

In addition, there's an issue with getDateOfDataInCache

If there's no cache key or no data in cache, the method returns Thu Jan
01 01:00:00 UTC+01:00 1970 instead of null


Reply to this email directly or view it on GitHubhttps://github.com//issues/123#issuecomment-19959373
.

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

No branches or pull requests

2 participants