xwiki

Caching Issue with App Within Minutes sheet pages


I have created simple AppWithinMinutes application and I added following velocity code at the end in “sheet” page just before the html tag ends:

<div>
    #set ($title = $doc.title)
    ## OR #set ($title = $doc.name), depending if your pages have titles

    #set ($newTitle = $title.substring(0,6) + "X" + $title.substring(7, $title.length()))
    <h2>Applications with a tag: $newTitle</h2>
    {{PagesByTag tagName=$newTitle}}{{/PagesByTag}}
</div>

PagesByTag is a macro that I created to list all pages that contains the tag of a new title that I calculated.
Problem is: I have a page called “My Application” with a tag “SERVERX01”
I have created a page in my AppWithinMinutes called “SERVERD01”. So now when I visit page SERVERD01, it displays “My Application” and that is desirable behavior (when you hard refresh it, disappears… hard refresh again brings it back… So it seems to be a cache issue…)
Now when I create a page in AppWithinMinutes called “MYAAPPD21”. Now “My Application” shows up here as well… This is not expected since $newTitle now will be “MYAAPPX21” and there is no page with that tag… (Hard refresh to that page will make “My Application” disappear but now when I visit “SERVERD01” page, “My Application” is gone from there as well)

There seems to be a serious caching issue with “sheet” page. Can someone tell me how can I disable caching for AppWithinMinutes display (sheet) pages?

Thanks a lot


Solution

  • I found a solution. In case someone like me facing exact same issue.
    There wasn't an issue with App Within Minutes. It was a macro I created PagesByTag It has cached property set to yes. That was causing tag result on the sheet page to cache and was displaying undesirable results.