Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cacheDuration config not working with a string duration interval #536

Closed
TraffordFewster opened this issue Jul 17, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@TraffordFewster
Copy link

We have had some complaints of our site caches not expiring, after digging into it a bit I found that us using a string duration interval is making the cache not have an end date.

Basic blitz.php config file

<?php

return [
    '*' => [
        // The amount of time after which the cache should expire (if not 0). See [[ConfigHelper::durationInSeconds()]] for a list of supported value types.
        'cacheDuration' => 'PT1S',
    ]
];

With the cache duration set to 'PT1S'which should be 1 second the cache never expires, if you change it to just a 1 the cache will expire. According to the ConfigHelper docs a string duration interval should be accepted but it doesn't appear to work.

Versions

  • craftcms/cms 4.4.15
  • putyourlightson/craft-blitz 4.4.6
  • PHP 8.1.19
  • MySQL 5.7.23
  • Redis 7.0.0
@TraffordFewster TraffordFewster added the bug Something isn't working label Jul 17, 2023
@bencroker
Copy link
Collaborator

Thanks for reporting this! Fixed in a487ca5 for the next release.

@bencroker
Copy link
Collaborator

Released in version 4.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants