Description
Since updating to v2.8 from 2.7 I've noticed that the cache is no longer clearing after the time set. If i clear all caches via the CLI it will work.
Here is one example of what I have. In this example I am outputting a the current dat and time to illustrate that the cache is not expiring.
return [
'elementType' => Entry::class,
'one' => true,
'cache' => 'PT1M', // 1 minute
'transformer' => function(Entry $entry) {
$date = date('d-m-y h:i:s');
return [
'date' => $date,
];
},
];
Steps to reproduce
- Enable Element API, create an endpoint which includes the above and cache it for 1 minute
- View the endpoint to show the current date and time
- Wait longer than 1 minute, then view the endpoint again (the date and time don't refresh)
Additional info
- Craft CMS version: 3.7.11
- Element API version: 2.8.1
- PHP version: 8.0.10
- Database driver & version: MySQL 8.0.26
Description
Since updating to v2.8 from 2.7 I've noticed that the cache is no longer clearing after the time set. If i clear all caches via the CLI it will work.
Here is one example of what I have. In this example I am outputting a the current dat and time to illustrate that the cache is not expiring.
Steps to reproduce
Additional info