Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

icewind1991
Copy link
Member

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

saves a db request for every request that touches mimetypes

Signed-off-by: Robin Appelman <[email protected]>
@icewind1991 icewind1991 added this to the Nextcloud 24 milestone Feb 2, 2022
@icewind1991 icewind1991 added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Feb 2, 2022
@icewind1991
Copy link
Member Author

On further thought, this might need some more work to handle new mimetypes properly

Comment on lines +169 to +170
$this->cache->set('mimetypes', json_encode($this->mimetypes));
$this->cache->set('mimeids', json_encode($this->mimetypeIds));
Copy link
Member

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 {

@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
This was referenced May 3, 2023
@skjnldsv skjnldsv modified the milestones: Nextcloud 27, Nextcloud 28 May 9, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@skjnldsv skjnldsv added the stale Ticket or PR with no recent activity label Feb 27, 2024
@skjnldsv skjnldsv marked this pull request as draft February 27, 2024 16:53
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv
Copy link
Member

skjnldsv commented May 2, 2024

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. ☺️
Our aim is to keep the project moving forward with active collaboration. Thank you for your understanding and continued support! 🙏

@skjnldsv skjnldsv closed this May 2, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
@skjnldsv skjnldsv deleted the cache-mimtype-mapping branch August 30, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement performance 🚀 stale Ticket or PR with no recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants