-
Notifications
You must be signed in to change notification settings - Fork 290
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
HTTP cache methods #129
base: master
Are you sure you want to change the base?
HTTP cache methods #129
Conversation
publicCache(), privateCache(), sendCacheHeaders() added noCache() refactored tests added
*/ | ||
|
||
/** Public HTTP cache flag */ | ||
const PUBLIC_CACHE = 'public_cache'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new constants should probably just be integers. They're values don't really have much significance, since they're meant to be compared as constants, so following the PHP (Java inspired) convention of simply assigning an integer value would be better suited here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String constant significance lies in debugging. Where string can suggest flags meaning without having to look at constant list. My mistake, I overlooked that DISPATCH constants use integers. Will cahnge to integers.
It looks fine to merge, but whether or not this belongs in this library (a microframework) is debatable. Up to you @Rican7. |
HTTP cache API added publicCache(), privateCache(), noCache()