Skip to content

Commit 3a090b0

Browse files
committed
Do not repeat ourselves in the class but rather hint to the README
1 parent c1463e2 commit 3a090b0

File tree

2 files changed

+9
-44
lines changed

2 files changed

+9
-44
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,20 @@ passing an array of `$options` in the constructor:
108108
**Type**: `int`
109109
**Default**: `500`
110110

111-
* **cache_tags_header**: The HTTP header name used to check for tags
111+
* **cache_tags_header**: The HTTP header name that's used to check for tags.
112112

113113
**Type**: `string`
114114
**Default**: `Cache-Tags`
115115

116116
### Caching `BinaryFileResponse` instances
117117

118-
This cache implementation allows to cache `BinaryFileResponse` instances but the files are not actually copied to
119-
the cache directory. It will just try to fetch the original file and if that does not exist anymore, the store returns
118+
This cache implementation allows to cache `BinaryFileResponse` instances but
119+
the files are not actually copied to the cache directory. It will just try to
120+
fetch the original file and if that does not exist anymore, the store returns
120121
`null`, causing HttpCache to deal with it as a cache miss and continue normally.
121-
It is ideal for use cases such as caching `/favicon.ico` requests where you would like to prevent the application from
122-
being started and thus deliver the response from HttpCache.
122+
It is ideal for use cases such as caching `/favicon.ico` requests where you would
123+
like to prevent the application from being started and thus deliver the response
124+
from HttpCache.
123125

124126
### Cache tagging
125127

src/Psr6Store.php

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -71,44 +71,7 @@ class Psr6Store implements Psr6StoreInterface, ClearableInterface
7171

7272
/**
7373
* When creating a Psr6Store you can configure a number options.
74-
*
75-
* Either cache_directory or cache and lock_factory are required. If you
76-
* want to set a custom cache / lock_factory, please **read the warning in
77-
* the README first**.
78-
*
79-
* - cache_directory: Path to the cache directory for the default cache
80-
* adapter and lock factory.
81-
*
82-
* - cache: Explicitly specify the cache adapter you want to
83-
* use. Note that if you want to make use of cache
84-
* tagging, this cache must implement the
85-
* Symfony\Component\Cache\Adapter\TagAwareAdapterInterface
86-
*
87-
* Make sure that lock and cache have the same
88-
* scope. *Read the warning in the README!*
89-
*
90-
* Type: Symfony\Component\Cache\Adapter\AdapterInterface
91-
*
92-
* - lock_factory: Explicitly specify the cache adapter you want to
93-
* use. Make sure that lock and cache have the same
94-
* scope. *Read the warning in the README!*
95-
*
96-
* Type: Symfony\Component\Lock\Factory
97-
* Default: Factory with SemaphoreStore if available,
98-
* FlockStore otherwise.
99-
*
100-
* - prune_threshold: Configure the number of write actions until the
101-
* store will prune the expired cache entries. Pass
102-
* 0 to disable automated pruning.
103-
*
104-
* Type: int
105-
* Default: 500
106-
*
107-
* - cache_tags_header: Name of HTTP header containing a comma separated
108-
* list of tags to tag the response with.
109-
*
110-
* Type: string
111-
* Default: Cache-Tags
74+
* See the README for a list of all available options and their description.
11275
*/
11376
public function __construct(array $options = [])
11477
{
@@ -550,7 +513,7 @@ private function isBinaryFileResponseContentDigest($digest)
550513
}
551514

552515
/**
553-
* Increases a counter every time an item is stored to the cache and then
516+
* Increases a counter every time a write action is performed and then
554517
* prunes expired cache entries if a configurable threshold is reached.
555518
* This only happens during write operations so cache retrieval is not
556519
* slowed down.

0 commit comments

Comments
 (0)