Skip to content

Commit 32e1257

Browse files
committed
Changed default_ttl to 0
1 parent 67f5c1a commit 32e1257

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
## UNRELEASED
44

5+
### Changed
6+
7+
- The default value for ``default_ttl`` is changed from ``null`` to ``0``.
8+
59
### Fixed
610

711
- Issue when you use `respect_cache_headers=>false` in combination with `default_ttl=>null`.
12+
- We allow ``cache_lifetime`` to be set to ``null``.
813

914
## 1.1.0 - 2016-08-04
1015

src/CachePlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ private function configureOptions(OptionsResolver $resolver)
264264
{
265265
$resolver->setDefaults([
266266
'cache_lifetime' => 86400 * 30, // 30 days
267-
'default_ttl' => null,
267+
'default_ttl' => 0,
268268
'respect_cache_headers' => true,
269269
'hash_algo' => 'sha1',
270270
]);
271271

272-
$resolver->setAllowedTypes('cache_lifetime', 'int');
272+
$resolver->setAllowedTypes('cache_lifetime', ['int', 'null']);
273273
$resolver->setAllowedTypes('default_ttl', ['int', 'null']);
274274
$resolver->setAllowedTypes('respect_cache_headers', 'bool');
275275
$resolver->setAllowedValues('hash_algo', hash_algos());

0 commit comments

Comments
 (0)