Article tags and cache invalidation
Opened this issue · 9 comments
We currently cache the entire rendered article view per user.
Until now, this has been fine, since the cache is not re-used once a new articleContent is created.
But with tags, this caching introduces a problem.
We already cache the html output of each ArticleContent, so I guess the easiest fix might be to stop caching of the rendered article.html
Perhaps tags should be added to articleContents, and not articles. That way, we get versioning of tags as well.
the easiest fix might be to stop caching of the rendered article.html
We probably don't want to do this for performance reasons.
Adding them to article contents instead doesn't really fix the problem, as the rendered article will still be cached.
We would have to include the number of tags or something as part of the cache key to make sure they are properly invalidated.
I meant that every time we do a change to the tags, we make a new articlecontent with a new set of tags based off the old one.
Perhaps tags should be added to articleContents, and not articles. That way, we get versioning of tags as well.
I like this suggestion. It is compatible with #357
Incidentally, this also allows tags to be added to the english version of a compendium and not the norwegian
Incidentally, this also allows tags to be added to the english version of a compendium and not the norwegian
That's not nessecesarily a good thing. If a person searches for matte 3
, I'm sure he'll want the english version if no version in norwegian is present.
Yes, but in the scenario you describe, the user is searching for a tag that nobody has added yet, right? Then that is the reason why there are no search results.
Anyway, the search engine can be designed to broaden the search (full text search in the backend?) in case the quick front end search yields no results. That should cover most scenarios.
Yes, but in the scenario you describe, the user is searching for a tag that nobody has added yet, right?
I described a scenario where matte 3
is not present on the english version, since tags are attached to the specific language they are in, so it wouldn't necessarily be natural to put norwegian tags on an english compendium.