-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Caches refreshing too many things on publish/updates? #5362
Comments
Hi I re-created a new brand site with Umbraco V8, we need to transfer old site items to new one. I created a simple program to do that and it worked perfectly but after that I noticed transferred objects is available in backoffice but not in site. After a quick lookup I found that every node should have a record in cmsContentNu table, I'm wondering how to that? Also I tried re-building NuCache database but it made a lot more problems such as unpublishing some of old published contents. Thanks |
There are several, distinct questions here. About the second one, importing content... the easiest way would be, once your content has been updated, to go to the Settings / Published Status dashboard, and hit the Rebuild button - that would re-populate the About the first one, I hope we don't really rebuild the entire content cache anytime something is rebuilt. That would be horribly inefficient. Can you provide more details about this question? Like, how do you know we rebuild everything, how do you reproduce the situation, etc? |
We are also having the same issue as Johan. Having looked at the ContentService it appears that the treeChangeType for exitsing published nodes is always set to refresh the whole branch, rather than the individual node, causing the node and descendants to be processed during the Cache refresh. |
I see what you are doing on the PR. Unfortunately... there is a reason why we refresh the whole branch. Re-publishing a document may change its url segment, hence its url, and the url of all children - that being said it should not impact the content of the contentNu table - maybe we are too agressive. So I cannot merge the PR "as is" but I do understand the intent and the possible issue (refreshing way to much). Need to look into it in details. |
I don't think that changing the URL segment actually causes a problem. Unless I'm missing something, the only cache that needs to be refreshed/invalidated for the whole branch is the one in |
This is what is happening when you publish a node - for this example, lets assume it's the Root node which has 1000 descendants (i.e. the whole site).
I don't see why this is necessary at all since there isn't anything to update. We don't change any data in the nucache DB table for descendant rows so there is no reason to update what is in memory since it will be the same. Even if the content name is changed, this doesn't affect any of the data for any other node either in the DB or in nucache. We do need to update all descendants when nodes are moved or if the path changes but this is not the case when saving/publishing a given node. I think the PR is actually ok, i will run some tests first but just wanted to get any feedback here as well. Let me know what you think. |
I've merged in #5439 From my tests this all works well and there is certainly a ton less overhead. I believe the primary reason for the slowdown was because of the SQL call to load in all descendants. Of course updating nucache in memory is overhead too ... which has far less overhead in 8.2 as well. |
umbraco v8
after publish or update pages or articles or any document type, umbraco goes to update cache (database and files)
but when i have about 120,000 record it take about one hour!!! it need to wait about one hour to publish a not or update a document.
but we need just update updated document cache not all cache date, you remove all cache data and rebuild it from binning, it's not impossible for large data websites
This item has been added to our backlog AB#2860
The text was updated successfully, but these errors were encountered: