Caching Issue Related to Indexing Again
I can't believe that after two years, I am running into a similar, if not the same, problem related to index caching (see Caching Issue Related to Indexing) again. Here is a description of the problem:
-
Before November 2015, I have an implementation of a responsive design (RWD1) that uses configuration blocks, a storage region, and a template-level format.
-
Around November 2015, I started implementing the RWD again (RWD2), adopting the one-template design. In the new design, I have a lot less global components, and less regions in the template. Besides the template-level format, all other formats are Velocity scripts.
-
Today, I started converting my cascade-admin site from RWD1 to RWD2. And I ran into the left-menu problem. After a folder has been converted (by switching the content type of pages within using web services), when I navigate from one sub-folder to another sub-folder, the left menu from the first sub-folder sticks when I am actually in the second sub-folder and is not updated.
-
I know that this is a caching problem because if I turn off Index Block Rendering Cache, or if I turn on both Enabled and Use legacy caching strategy, the problem goes away. The issue is that the rendering time is much longer when either caching is off or both options are on.
-
The funny thing is that I have never seen this problem with the RWD1 implementation. And if I convert pages back to the content type associated with RWD1, the problem goes away as well. The only thing I can say is that RWD2 relies on indexing more heavily than RWD1. For example, I no longer need a breadcrumb block/region. I also mix
$contentRoot
with the Locator Tool to solve the original caching problem. But I did not expect any new problem until today.
I know that this problem cannot be easily reproduced, because it involves several sites at the same time. I just want to ask if there is any plan to fix this caching problem in the near future. Since more and more people are adopting the one-template approach, sooner or later, other people will be making similar complaints too.
Wing
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 14 Jan, 2016 01:42 PM
Hi Wing,
It definitely sounds as though you are running into the same cacheing issue that stems from essentially nested Index Block content. I went ahead and attached the known defect to this discussion so you can track it's progress in the upper right-hand corner of this page. I will also try to bump this up a bit in priority since we've had a couple of other clients run into this as well.
In the meantime, I was reading back over your original discussion to get a better picture of where you had left off. I am assuming the end result was your RWD1 implementation?
I'm assuming you are using the main, or a nested, Index Block to look for the calling page and build out your navigation. This would explain the incorrectly cached data. Is this Index Block contextual and based on the calling page? Would it possible to use the Locator Tool at this point to generate the navigation as a workaround for the caching issue?
Completely understand, and I apologize for the inconvenience. Looking over the developer comments on the original issue, it appears this is quite a complex issue and might take some time to work through a solution.
With Cascade 8 being the main priority at the moment, I am not able to provide a timeline at this time. As I mentioned, I will try to push this issue up in the priority list.
Please let me know if you have any questions.
Thanks!
2 Posted by Wing Ming Chan on 14 Jan, 2016 02:21 PM
Ryan,
Thank you for looking into this again.
This problem was generated by the following configuration: an index block named left-menu is attached to a data definition block named _left-column, which in turn is picked up by indexing. Later on, the indexed information is processed and stored in the region named STORAGE.
Now I change my design and remove left-menu altogether. Instead, I change the indexing behavior of the index block named calling-page so that the option
Start at the current page with folder hierarchy, and also include siblings
is selected. Since the information of the calling page is always updated properly, I don't need to worry about caching anymore. Now I can generate both the breadcrumb and the left menu within DEFAULT, and the relevant div's are moved to the right places by the template-level format.I have also considered using the Locator Tool. My only concern—I haven't tried this approach yet—is the folder order of the children in the current folder. If the Locator Tool does not return information on folder order, then I may need to query the database directly to get that information. Any thought on this one?
Wing
3 Posted by Ryan Griffith on 14 Jan, 2016 03:32 PM
Not a problem at all, Wing, thank you for the additional information.
This does make sense since contextual Index Blocks wouldn't be cached, so that top-most Index Block wouldn't contain incorrect information.
Another possible workaround, you could index a really simple Feed Block with your chosen Index Block. As long as that Feed Block never becomes invalid (a known issue), that chosen Index Block's content should not be cached.
Currently, the order of the children is based on their relative order (ie folder order); however, that is not something we officially documented so I can't guarantee it will always be that way. I can't think of an immediate reason to change this behavior and not use relative order since generally that is the preferred order method when traversing children, but I don't want to make any promises.
Please let me know if you have any questions.
Thanks!
4 Posted by Wing Ming Chan on 14 Jan, 2016 03:42 PM
When I have time, I will try using the Locator Tool.
I have just made a suggestion to my boss. Since the config block named _left_column is used mainly to house the index block left-menu, if the left menu is generated elsewhere, then there is no use of _left_column anymore, unless we want to add more blocks, besides the left menu, to the left column. My suggestion is to ban this practice altogether, and we can remove _left-column from the design.
Wing
5 Posted by Wing Ming Chan on 14 Jan, 2016 04:03 PM
You are right. The folder order is preserved when using the Cascade API. I used the following code to confirm that:
Wing
6 Posted by Ryan Griffith on 14 Jan, 2016 04:10 PM
Thank you for confirming, Wing. Locator Tool with Cascade API might be slightly slower than a cached Index Block, but if you just need a handful based on the calling page it could be an option.
As you mentioned, if you can nix the nav all-together as an option, that's definitely another solution.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 14 Jan, 2016 04:10 PM.