Ensure freshness of settings with snippet creation
Application settings from the database are currently cached locally in the thread for a full minute after the changes are made. That means if an administrator attempts to change the default storages in the admin page, it might take up to a full minute for those changes to take effect. Since we don't have a great cache invalidation strategy for local caches yet, the simplest approach to solving this problem would be to expire the local application setting cache whenever we create a snippet. This causes every snippet creation to make an additional SELECT call for `application_settings`.
Showing
Please register or sign in to comment