-
-
Notifications
You must be signed in to change notification settings - Fork 97
Description
I see in the v0.140.0 release notes that:
... in v1, each Component will have at most one static template. This static template is cached internally per component class, and reused across renders.
While I understand this for production deployments, when developing, caching the template means that you must have the Django development server reload every time you change a component template. This is comparatively slow for me, and isn't a requirement for any other Django template file outside of django-components
.
For now, I've gone back to using get_template_name()
to bypass the cache, but that's obviously deprecated. It would be nice if there was a properly supported option for this (even if it's just a global setting) that could be used to turn off this cache. It would massively improve the developer experience.
Note: Given I was initially confused about this and thus others may be too, this is unrelated to the component caching which caches the component for specific inputs. I'm talking about the cache of the template file specified in the template_file
attribute - that cache appears to be completely separate to the component cache and is not controllable by the Component.Cache.enabled
flag.