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
According to @lrowe , calculated properties should be cached and not re-calculated, but @j1z0 with 4dn has reported that they are always calculated.
Let's start by writing a test in snovault to prove this behavior. There are multiple caching mechanisms, but the one that matters is elasticsearch.
It might make sense to actually have calculated properties NOT be indexed in elasticsearch as long as GET/calculate is efficient enough; this could allow us to connect to linked objects that are never embedded and hence will not invalidate the parent object on update.
The text was updated successfully, but these errors were encountered:
The category argument of calculated_property determines which 'frame' it will end up in. It defaults to object which means it ends up being cached as that frame is stored in elasticsearch.
The elastic search caching is implemented as object and expand views which override rendering for results that come from elastic search in cached_views.py.
To avoid any caching use @calculated_property(category='page') like here in resources.py.
According to @lrowe , calculated properties should be cached and not re-calculated, but @j1z0 with 4dn has reported that they are always calculated.
Let's start by writing a test in snovault to prove this behavior. There are multiple caching mechanisms, but the one that matters is elasticsearch.
It might make sense to actually have calculated properties NOT be indexed in elasticsearch as long as GET/calculate is efficient enough; this could allow us to connect to linked objects that are never embedded and hence will not invalidate the parent object on update.
The text was updated successfully, but these errors were encountered: