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

Adding http_cache parameter to @viewconfig functions #210

Closed
wants to merge 1 commit into from

Conversation

rich-hart
Copy link
Contributor

"When you supply an http_cache value to a view configuration, the Expires and Cache-Control headers of a response generated by the associated view callable are modified. The value for http_cache may be ... zero (0). If the value is zero, the Cache-Control and Expires headers present in all responses from this view will be composed such that client browser cache (and any intermediate caches) are instructed to never cache the response."

- pyramid view configuration documentation

Any @authenticated_only function is set to NO_CACHE by default

Fixes #206

@rich-hart
Copy link
Contributor Author

Are there any suggestions on how write a unit test to check the functionally of these changes? I'm at a loss.

@rich-hart
Copy link
Contributor Author

Also does there need to be a http_cache = NO_CACHE parameter added here?

@view_config(route_name='login')

I guess not...

@mmulich
Copy link
Member

mmulich commented Mar 19, 2015

Please rebase this. Also, can you confirm the headers through the browsers dev console and paste them here?

@rich-hart rich-hart force-pushed the no_caching_for_authenticated_views branch from 1847d78 to 365cfe1 Compare March 19, 2015 15:30
@rich-hart rich-hart closed this Mar 19, 2015
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 365cfe1 on no_caching_for_authenticated_views into * on master*.

@mmulich
Copy link
Member

mmulich commented Mar 19, 2015

@rich-hart Did you mean to close this?

@rich-hart
Copy link
Contributor Author

@pumazi I did, about to reopen another one

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

Successfully merging this pull request may close these issues.

Incorrect user login
3 participants