- Issue created by @ericgsmith
Files with very many references can cause performance issues.
As anyFileUsageHasAnonAccess relies on file_get_file_references this does an entity load on all references. For a file with many references this can use a lot of memory as you could have thousand of entities loaded for this check.
Any solution needs some kind of denormalization and respect cacheability of access results.
So add a cache bin that contains access for every file, AND its cacheability.
Consider using DCache module, it will make the logic cleaner.
As a result, with warm cache, determining access does a simple Cache::getMultiple()
Implement
TBD
TBD
TBD
Active
1.0
Code