[Neos] Issue with content cache

nikos nick at jamalade.com
Thu Jan 22 18:10:41 CET 2015


Hi all

I have a slight issue with the content cache and can't figure out if I have missed something or there is a bug somewhere.

I have a content node  which displays teaser's from other nodes, the target nodes, on the site.

Everything displays well, but I noticed that when the target nodes content is edited the teaser is not refreshed to reflect this.

So i thought i should add some cache directives to my teaser typoscript like so (included in full)

prototype(Reroot.RerootSiteCom:SectionTeaser) < prototype(TYPO3.Neos:Content){
     templatePath = 'resource://Reroot.RerootSiteCom/Private/Templates/NodeTypes/SectionTeaser.html'
     node = ${node}
     attributes.class = 'teaser-element'
     attributes.class. at process.1 = ${value + ' clearfix'}
## the @override pushes this variable onto the context
     @override.teaserTargetNode=${q(node).property('teaserTargetNode')}
     parentNode= ${q(teaserTargetNode).parents('[instanceof TYPO3.Neos.NodeTypes:Page]').first().get(0)}
     teaserHeadline=${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Headline]').first().property('title')}
     teaserText=${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Text]').first().property('text')}

    @cache {
                 mode = 'cached'
                 maximumLifetime = '86400'
                 entryIdentifier {
                         node = ${node}
                         domain = ${site.context.currentDomain}


                 }
                 entryTags {
                         1 = ${'DecendantOf_' + teaserTargetNode.identifier}
                         2 = ${'Node_' + teaserTargetNode.identifier}

                 }
         }
}

my expectation, given the entryTags as above, that if the targetNode or its descendants are modified then the cache for the teaser would be refreshed 
and so reflect the changes. This isn't the case. So I am wondering if
1) I am looking at this too simplistically (probably am)
2) there is an error in the above
3) there is a bug with caching.

Ideas as gratefully appreciated.

Warm wishes

Nikos


More information about the Neos mailing list