inveniosoftware / invenio-vocabularies

Invenio module for managing vocabularies.
https://invenio-vocabularies.readthedocs.io
MIT License
2 stars 40 forks source link

facets: implement in-memory cache #271

Closed ntarocco closed 9 months ago

ntarocco commented 9 months ago

To be deployed and tested in an env.

ntarocco commented 9 months ago

@ppanero if you have some time, can you please have a quick look if I missed anything?

ntarocco commented 9 months ago

Nice work! At first glance I do not see any issue. I'm wondering why it was done specifically on funcers and affiliations and not more generic:

* in VocabularyLabels

* a subclass of the above CacheVocabularyLabels (this would be a new class

I guess for now we only need to optimize those too? What about subjects (e.g. MeSH is very large).

Honestly, I simply search everywhere the usage of VocabularyLabels. Funders and Affiliations inherit from there. The objective was to add, by default, a cache to all vocabs facets, to avoid extra DB/Search queries. Is subjects used as facets?