You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like get_preview_data() is called for every entry in settings.LANGUAGES, but it doesn't depend on the language. If get_preview_data() is non-trivial (e.g., hits the database, builds complex objects), this could be unnecessarily time-consuming. Maybe the preview data could be cached in an instance variable?
The text was updated successfully, but these errors were encountered:
The reason why we did that is because some implementation of models fields translation return the right translation of a field with regard to the current user language. So in case we change the language we need to refresh this cache anyways
It looks like
get_preview_data()
is called for every entry insettings.LANGUAGES
, but it doesn't depend on the language. Ifget_preview_data()
is non-trivial (e.g., hits the database, builds complex objects), this could be unnecessarily time-consuming. Maybe the preview data could be cached in an instance variable?The text was updated successfully, but these errors were encountered: