-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
cache mimetype mappings in local cache #30972
Conversation
saves a db request for every request that touches mimetypes Signed-off-by: Robin Appelman <[email protected]>
On further thought, this might need some more work to handle new mimetypes properly |
$this->cache->set('mimetypes', json_encode($this->mimetypes)); | ||
$this->cache->set('mimeids', json_encode($this->mimetypeIds)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it has no TTL, we need to document that people need to clear the cache when they add a new mimetype manually?
E.g. in
class RepairMimeTypes implements IRepairStep { |
Closing this pull request due to lack of recent activity and updates. We appreciate your contribution and encourage you to reopen or provide further updates if necessary. |
saves a db request for every request that touches mimetypes
An alternative would be to cache individual mimetype mappings instead of the full mapping, but I suspect that loading multiple smaller values from cache would be slower than loading one big one