A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/django-components/django-components/issues/1164 below:

ComponentCache hash() does not account for slot content · Issue #1164 · django-components/django-components · GitHub

I think the default behavior should be that the content of a component slot (i.e. the html inside a slot) should also be hashed and included in the ComponentCache hash.

For example, I have a badge component where I want to be able to define a slot with html instead of just a variable:

{% component "badge" type="info" %}
  <i class="fas fa-band-aid"></i> <span>Some Text</span>
{% endcomponent %}

I think adding "slot hashing" would enable ComponentCache to cover like >99% of the use cases. I'm aware that I can still shot myself in the foot since the component context is not "isolated" by default.

I'll probably get around to looking at an implementation for this in the next month.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4