Comments (8)
Hi Kevin, thanks for the library, I am using in production just fine!
When you have time, could you write an example on how to implement the Flysystem cache? I tried but couldn't figure out how. I am new into this.
Thanks again! BTW I have you referenced here in Orchestrate library https://github.com/andrefelipe/orchestrate-php#cache-middleware
from guzzle-cache-middleware.
@andrefelipe Hi, thank you for using it!
I will do that ASAP ;)
from guzzle-cache-middleware.
Hi,
can I even point that the example given for the public cache seems wrong?
the code example should use the PublicCacheStrategy
instead is using like the private one PrivateCacheStrategy
.
Or what's the diffrerence between PrivateCacheStrategy
and Public
One?
(anyway it is enough to read the comment in the code :)
thank you.
from guzzle-cache-middleware.
Hi @Raffaello, you're right!
The difference is about privacy and cache headers. Public cache will not cache something marked as Cache-Control: private
. One good explication here.
from guzzle-cache-middleware.
@andrefelipe I have added an example for Flysystem
in the README. Sorry for taking some time to do it!
from guzzle-cache-middleware.
Hey @Kevinrob thank you very much! Interesting to see the possibility to cache in S3 buckets. Not sure the IO delay will pay off, but great to have the possibility.
from guzzle-cache-middleware.
Good job on this beautifully designed package!
After a bit of poking around I found out that the caching strategy I really need is GreedyCacheStrategy
and I think this should be documented as well in the README. In fact, I composer-required this package expecting it to do just that - cache every Guzzle request regardless of any cache-related recommendation in the response.
My use case is this: I'm writing a Goutte-based web scraper and I need to cache Guzzle responses for a reasonable amount of time.
from guzzle-cache-middleware.
from guzzle-cache-middleware.
Related Issues (20)
- [question] how to define time how long should the cache live? HOT 1
- Middleware does not cache 201 status code HOT 1
- 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
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.