Problem/Motivation
In a module, I'm trying to configure time based access restriction so I use a _custom_access callback in which I return an AccessResult object on which I apply setCacheMaxAge(60) to ensure that access is checked once per minute.
The problem is that this access check never expires for anonymous users - even if I set the page cache max age to 60 seconds too.
Logged in users do not have the same issue.
The same problem occurs with page content.
I created a quick gist to illustrate : https://gist.github.com/DuaelFr/7a11327b8a5acaa5da30
Steps to reproduce
- install Drupal standard
- create a tiny module like shown in the gist above
- navigate to /test as anonymous
- wait between 61 and 119 seconds
- reload the page
Expected result :
Something changed
Current result :
Nothing changed
Proposed resolution
No idea.
Remaining tasks
Find out what's going on. Fix it.
User interface changes
None.
API changes
None.
Data model changes
None.