-
Notifications
You must be signed in to change notification settings - Fork 25
TSFE->isStaticCacheble #271
Comments
@phathoang Thanks for pointing this out. So, in terms of link structure, your use case would be
Right? We'll have to investigate what actually happens. To my knowledge, |
That's right, so if we have 30 subpages we need to visit them all to get them into the sitemap. The main problem is that What problems can it cause, if we remove the check of USER/COA_INTS?
versus:
If we remove the check of |
@phathoang You seem to be close to a fix that meets your needs. Would you like to provide a pull request? I'd like to review your fix and see if breaks something. For your PR, please add yourself to the list of contributors. |
As far as I can see, you fixed it with I think, one reason to check against the cache is to sort out unwanted parameters (see #254 for details). That requires 6.2.28+ or 7.6.12+ to work as expected (see #268). Eventually, we need to improve that a bit for your use case: There should be a fallback for non-cacheable pages (eventually remove all parameters or do something like whitelisting or look if the canonical-handling can be applied here, too.). And/or do the check (which might fail), but then process the subpages at least. There's also a performance aspect: If we don't check the cache, metaseo thinks that a page changed at every request. The page then gets indexed every time, including child pages. That could slow down a site considerably. For the purpose of checking for changes, we could fall back to This comment is open for further investigation, it's rather things that need to be considered for an investigation. |
@phathoang I'd also be interested in the question what was leading to the circumstance that pages were not cached by TYPO3. Were you testing in TYPO3's development mode or logged in, eventually? Maybe we should extend FAQ and documentation in that respect if that was the reason. Or was it some extension we should be aware of? |
@thomaszbz In our case we're having pw_comments inserted into a page as non-cacheable plugin. So it's not that TYPO3 doesn't cache the page, it does, but not everything since there's non-cachable plugin. So the caching works properly but the pages won't get into the sitemap because of TSFE->isStaticCacheble unless we set plugin.metaseo.sitemap.index.allowNoStaticCachable. We actually removed the whole check of TSFE->isStaticCacheble in our tq_seo so that's why I'm here questioning why it is needed there. About unwanted parameters, like /?pk_campaign=abc, shouldn't be a problem. Not sure how it happens in #254 but looking at the code, /?pk_campaign=abc shouldnt appear in the sitemap. In page-indexing hook there's a getPageUrl function which checks if there's a cHash, if not, the url will be generated with
which shouldn't contain the unwanted get-parameter since there's no cHash. And in the link-hook it shouldn't be a problem either, since the generated links don't have the unwanted parameter. About the performance, I'm fine with checking cache, but I don't see why there's a need to check for non-cachables. I'm not able to submit a pull-request atm but I think I would have just removed the this part of code in FrontendUtility::isCacheable
|
In both hooks, typoLink_PostProc and pageIndexing there's a condition that checks $TSFE->isStaticCacheble()
Is it really needed? In the typoLink_PostProc hook it doesn't make much sense. If I'm on a page with links to 30 subpages, I'd want the subpages to be in the sitemap, even if the page itself has non-cacheable content.
The text was updated successfully, but these errors were encountered: