Docs for new cache plugin option#179
Conversation
500f1d6 to
0f71038
Compare
| Since v1.3.0 does the ``CachePlugin`` have 2 factory methods to easily setup the plugin by caching type. | ||
|
|
||
| .. code-block:: php | ||
| $cachePlugin = CachePlugin::clientCache($pool, $streamFactory, $options); // Which allows caching responses with the ``private`` or ``no-store`` cache directive |
There was a problem hiding this comment.
Can one have code blocks within notes?
Anyhow: make sure to split comments and code so the lines are not too long.
// comment
$cachePlugin = // ...
// comment
$cachePlugin = // ...|
|
||
| .. code-block:: php | ||
|
|
||
| $cachePlugin = CachePlugin::clientCache($pool, $streamFactory, $options); // Which allows caching responses with the 'private' or 'no-store' cache directive |
There was a problem hiding this comment.
Can one have code blocks within notes?
Anyhow: make sure to split comments and code so the lines are not too long.
// comment
$cachePlugin = // ...
// comment
$cachePlugin = // ...There was a problem hiding this comment.
I don't know if it works as the preview screen on github doesn't show the output good. I will change the how the comments are placed!
I could also put a not and then in a separate code block (outside of the note) the example code?
1f3ffe9 to
663fdb4
Compare
|
@Nyholm I've fixed the comment about the line length and moved the code block out of the note (just to be sure it renders correctly!) |
dbu
left a comment
There was a problem hiding this comment.
thanks for the quick PR. have some small requests for improvement.
| ---------------------- | ||
|
|
||
| This plugin does not cache responses with ``no-store`` or ``private`` instructions. | ||
| By default this plugin does not cache responses with ``no-store`` or ``private`` instructions. If you need to cache |
There was a problem hiding this comment.
please add no-cache to this list. then say that with the clientCache factory method, no-store and private will be ignored.
| .. note:: | ||
|
|
||
| Since v1.3.0 does the ``CachePlugin`` have 2 factory methods to easily setup the plugin by caching type. See the | ||
| example below. |
There was a problem hiding this comment.
i'd suggest to move most of this out of the node and instead say just that there are the factory methods for the client resp. server mode. then have the code block, and then below a note just saying "The two factory methods have been added in version 1.3.0."
663fdb4 to
26fbf65
Compare
|
Ok, I've fixed your comments @dbu! |
|
Thank you! |
This PR adds the docs for the new cache plugin option introduced in php-http/cache-plugin#26.
Closes: #178