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

Included LastModified in response headers #202

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

dmalanij
Copy link
Contributor

This is a solution for #201.

Implemented logic to keep record of the timestamp when a response content was generated and use it as the Last-Modified response header.
The implementation is quite basic and tried to reduce the impact, however it has a breaking change on the signature of ApplyCacheHeaders method.
And it could be improved, depending how you'd like to expose this, by:

  • Using an additional boolean property in the CacheOutputAttribute to control whether the header is included or not
  • Trying to avoid inline serialization / deserialization of the timestamp (by either changing the restriction in the Get<> of the IApiOutputCache, or using a wrapper object which could also help with the Replace 3 cache calls with ICacheItem #41)

Additionally, I can include in the Pull Request some changes on the Demo application to support the CORS request that the scenario will probably require (and some other tweaks on it to make it easier for any developer to use it)

Implemented logic to keep record of the timestamp when a response content was generated and use it as the Last-Modified response header
Copy link
Owner

@filipw filipw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@filipw filipw merged commit 5a055b2 into filipw:dev Dec 19, 2017
@dmalanij dmalanij deleted the LastModifiedImplementation branch February 22, 2022 18:42
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