Comments (6)
Yes, this can be a good feature!
from guzzle-cache-middleware.
Hey there,
I know I'm 1 year late on that topic but I did not notice it before.
I'm really against the fact that the library modifies request objects (even if they're immutable). That's what the DelegatingCacheStrategy was designed for (changing strategy based on the request). It's a little more complex to use to achieve the same goal, but I'd have worked on improving this before having no other choice to touch on request objects.
Just saying 😺
from guzzle-cache-middleware.
@bpolaszek But we don't modifies request objects, do we?
from guzzle-cache-middleware.
Technically you don't, because PSR-7 objects are immutable, but my point is that you delegate to the Request object the responsibility to carry an information which is out of its scope. Nothing really important here, just quibbling with OOP 😄
from guzzle-cache-middleware.
Another solution would have been to fake a real Cache-Control
header, which would have behaved the same.
from guzzle-cache-middleware.
Okay, I understand your point! It's true.
Both methods are possible with this. 😄
from guzzle-cache-middleware.
Related Issues (20)
- Flysystem returns "File not Found" error on DELETE, POST, PUT calls HOT 1
- Incompatibility with Guzzle7? HOT 2
- "X-Kevinrob-Cache: MISS" although response is from cache HOT 1
- [Question] Specifying TTL For Laravel Cache HOT 3
- [Question] Redis - Deleting Cached Items Once Expired HOT 2
- Different TTL with GreedyCacheStrategy and RequestMatcher HOT 2
- igbinary_serialize(): Cannot serialize resource(stream) HOT 13
- Request with unsafe method does not invalidate cache HOT 1
- Drop doctrine/cache
- Response object without body? HOT 2
- CacheEntry::__sleep mutates response body to PumpStream which is read once
- Storing PHP serialized data in caches MUST be avoided HOT 2
- Not compatible with gmponos/guzzle_logger HOT 2
- POST request key generation. HOT 2
- Argument #1 ($stream) must be of type resource, int given HOT 15
- Facing SIGSEGV sometimes HOT 1
- Missing dependency on guzzlehttp/promises and not compatible with v2.0 HOT 3
- Undefined array key "request" HOT 7
- Missing returns in FlysystemStorage
- Feature request: revalidate some stale caches in the background
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guzzle-cache-middleware.