guzzle-cache-middleware icon indicating copy to clipboard operation
guzzle-cache-middleware copied to clipboard

Write a good documentation

Open Kevinrob opened this issue 9 years ago • 8 comments

Kevinrob avatar Feb 14 '16 09:02 Kevinrob

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

andrefelipe avatar Apr 08 '16 02:04 andrefelipe

@andrefelipe Hi, thank you for using it! I will do that ASAP ;)

Kevinrob avatar Apr 12 '16 10:04 Kevinrob

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.

Raffaello avatar Apr 14 '16 09:04 Raffaello

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.

Kevinrob avatar Apr 14 '16 09:04 Kevinrob

@andrefelipe I have added an example for Flysystem in the README. Sorry for taking some time to do it!

Kevinrob avatar Apr 23 '16 11:04 Kevinrob

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.

andrefelipe avatar Apr 23 '16 20:04 andrefelipe

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.

bogdanghervan avatar May 24 '16 00:05 bogdanghervan

@bogdanghervan : #80

afoeder avatar May 02 '17 12:05 afoeder