Currently the cache is only invalidated when the datastore changes, while it should rely on selected period of time. Fixes #1659
Signed-off-by: VirtualTam <virtualtam@flibidi.net>