[TYPO3-english] realurl search page and ver large tx_realurl_urlencodecache
Stephan Schuler
Stephan.Schuler at netlogix.de
Thu Sep 5 13:15:38 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hey there.
I did this by tricking a little around. It's ugly in two areas: Ugly code and ugly hacking.
So this can never be a general advise. It's only about the very known parameter "tx_solr[filter]".
The thing is: I know that I will never achieve to map tx_solr[filter] to RealUrl. So there's no benefit in passing tx_solr params through RealUrl at all.
What I did:
I fetched the $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] array, which contains the "tx_realurl" call at some point. This is where a completely TypoLinked URL (containing cHash if necessary) gets passed through RealURL encoding.
I just make sure to have two different userFuncs just wrapped around tx_realurl: One right before and one right after. I simply traverse the linkData-PostProc stack a bit and add my beforeUserFunc right before RealURL and my afterUserFunc right after. It's important to keep the overall order in place here, so pushing those functions to the stack is a bit tricky.
The beforeUserFunc removes all tx_solr[filter] parameters from the URL, the afterUserFunc reads them. This makes sure tx_realurl only deals with known parameters.
The main benefit of this is: There are >100 of different facet links one of my lager facet list pages. After removing tx_solr[filter], those >100 links are equal. So passing them all through RealURL now is blazing fast since it utilizes a 100% matching cache now.
It's important to not use any TypoLink hook or something which could influence cHash creation. So I decided to wrap RealUrl as a whole.
I don't care about the size of cache tables a bit. But I do care about reducing the amount of realurl-parsed URLs by 100 per page. But in fact, this feather does lower the number of cache entries, too.
Regards,
Stephan Schuler
Web-Entwickler
Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de
- --
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de
netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt
- -----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von Dmitry Dulepov
Gesendet: Donnerstag, 5. September 2013 09:13
An: typo3-english at lists.typo3.org
Betreff: Re: [TYPO3-english] realurl search page and ver large tx_realurl_urlencodecache
Hi!
Jan Slusarczyk wrote:
> What should I do to my install to stop this growth?
Nothing. But you can set up a cron job to truncate that table from time to time. It is safe to do that.
- --
Dmitry Dulepov
Today is a good day to have a good day.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.3.0 (Build 9307)
Charset: utf-8
wpUDBQFSKGfcpp0IwsibV8MBCB+GA/4obNIzO8sUQqdtzrpiDGDJorIX3zPc5Spd
ode1+b4+YQbZFd2MTyE4XY6XVyqujf4aDUMMfXHSilLmhkcdUuZEQaDVfeMlBNFp
o3jyP1pbEVMp+rjefhFh2cUgLDDjAJe9n+3O8M3LKsbTIi5RdtJu4T/1xGU8Eh1S
ZH+SSwoh5g==
=NWM6
-----END PGP SIGNATURE-----
More information about the TYPO3-english
mailing list