Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Article tags and cache invalidation #356

Open
stianjensen opened this issue May 25, 2015 · 9 comments
Open

Article tags and cache invalidation #356

stianjensen opened this issue May 25, 2015 · 9 comments

Comments

@stianjensen
Copy link
Member

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

@sigvef
Copy link
Collaborator

sigvef commented May 25, 2015

Perhaps tags should be added to articleContents, and not articles. That way, we get versioning of tags as well.

@sigvef
Copy link
Collaborator

sigvef commented May 25, 2015

the easiest fix might be to stop caching of the rendered article.html

We probably don't want to do this for performance reasons.

@stianjensen
Copy link
Member Author

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.

@sigvef
Copy link
Collaborator

sigvef commented May 25, 2015

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.

@iver56
Copy link
Contributor

iver56 commented May 25, 2015

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

@stianjensen
Copy link
Member Author

Incidentally, this also allows tags to be added to the english version of a compendium and not the norwegian

@cristeahub
Copy link
Member

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.

@iver56
Copy link
Contributor

iver56 commented May 25, 2015

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.

@cristeahub
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants