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

Feature - caching public/private/noCache #128

Open
JindrichPilar opened this issue Aug 5, 2013 · 4 comments
Open

Feature - caching public/private/noCache #128

JindrichPilar opened this issue Aug 5, 2013 · 4 comments

Comments

@JindrichPilar
Copy link

I am procesing Response object after app is done with it and I run into small problem with caching.

Right now there is only noCache method implemented by directly adding headers.

I propose to add privateCache() and publicCache() and change it's inner works from directly adding headers to change a flag and add headers when they are being send.
Which will allow easily change and detect current caching strategy.

@Rican7
Copy link
Member

Rican7 commented Aug 5, 2013

I wouldn't mind taking a pull request if you wanted to show how you might implement this feature.
Otherwise, implementing it in your own project is easily done without having to fork the code. All you'd have to do is extend the Response class and inject it in the dispatch() method.

@JindrichPilar
Copy link
Author

I could implement it in my own project, but I think it deserves to be on original Response.
Implementation proposal #129

@chriso
Copy link
Contributor

chriso commented Aug 5, 2013

The problem with stepping into a full-featured Cache-Control helper is that there's a lot of other directives that you need to support. Some directives also expect an argument (e.g. max-age).

@JindrichPilar
Copy link
Author

Initially I didn't inteded full-featured Cache-Control. But tried to implement it in #129

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

No branches or pull requests

3 participants