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

Multiple CacheEntry objects with same key but different expires on DateTime #6

Open
kambg opened this issue Jan 5, 2012 · 2 comments

Comments

@kambg
Copy link

kambg commented Jan 5, 2012

In CachingContributor it looks like we always add CacheEntry to the store as long as we have a GET request method and status of 200.
Having this in mind we can end up with multiple CacheEntry objects with same key but different expires on DateTime.
What is the purpose of this mechanism, I would've thought we'd want to have single CacheEntry per key and that to be the latest resource that satisfied a request?

Cheers

@serialseb
Copy link
Member

Nope. The cache key is on the URI plus some headers on which the response to the cache vary, so you may have multiple cached representations for the same http header.

Don't remember the specifics but am pretty sure that's why it was built that way

Seb


From: Kamen84 [[email protected]]
Sent: 05 January 2012 17:51
To: Sebastien Lambla
Subject: [openrasta-caching] Multiple CacheEntry objects with same key but different expires on DateTime (#6)

In CachingContributor it looks like we always add CacheEntry to the store as long as we have a GET request method and status of 200.
Having this in mind we can end up with multiple CacheEntry objects with same key but different expires on DateTime.
What is the purpose of this mechanism, I would've thought we'd want to have single CacheEntry per key and that to be the latest resource that satisfied a request?

Cheers


Reply to this email directly or view it on GitHub:
#6

@kambg
Copy link
Author

kambg commented Jan 6, 2012

Thanks Seb. In the current implementation it looks like the VaryHeaders are always an empty dictionary. Can you give an example of what VaryHeaders should contain?

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

No branches or pull requests

2 participants