Limit Search, Ajax Search, Caching
Limit Search, Ajax Search, Caching
Hey there,
I've got htree questions:
1. Is there any possibility to limit the amount of searches a user makes in a certain time-period to not cause too much server overhead (spamming robots)
2. Is there already a Ajaxsearch implemented in CMSms or is there any easy way to? Which sources do I have to modify to return the search results as XML or something similar which could be easily parsed by javacsript to display?
3. Is there any caching mod? I know the full-page-caching mod but I'm using blocks where I include a commentscript which should obviously not be cached.
Thanks so far!
I've got htree questions:
1. Is there any possibility to limit the amount of searches a user makes in a certain time-period to not cause too much server overhead (spamming robots)
2. Is there already a Ajaxsearch implemented in CMSms or is there any easy way to? Which sources do I have to modify to return the search results as XML or something similar which could be easily parsed by javacsript to display?
3. Is there any caching mod? I know the full-page-caching mod but I'm using blocks where I include a commentscript which should obviously not be cached.
Thanks so far!
Re: Limit Search, Ajax Search, Caching
OK I did 1 and 2 myself, probably I'm gonny post a howto on my blog when it's finished 
but what about the third point?

but what about the third point?
Re: Limit Search, Ajax Search, Caching
Hello,
could you please elaborate on the third point ? Do you want the page to be cached or not cached ? I'm confused.
Pierre M.
could you please elaborate on the third point ? Do you want the page to be cached or not cached ? I'm confused.
Pierre M.
Re: Limit Search, Ajax Search, Caching
Yeah I want caching for everthing except the comments module which is a 3.-party-script which I include with a custom user-tag.
I thought again about it and I think I'm probably gonna do it like that:
1. implement full-caching mod
2. instead of directly including the comments-script in the content of a page, just write down something like
###COMMENT::$id###
3. AFTER (at the very last bottom of index.php) te full-caching-mod, output the content of the whole-site BUT replace the tag
###COMMENT::$id###
with the output of the comments script by using output buffer ob_start(); ob_get_clean();
I thought again about it and I think I'm probably gonna do it like that:
1. implement full-caching mod
2. instead of directly including the comments-script in the content of a page, just write down something like
###COMMENT::$id###
3. AFTER (at the very last bottom of index.php) te full-caching-mod, output the content of the whole-site BUT replace the tag
###COMMENT::$id###
with the output of the comments script by using output buffer ob_start(); ob_get_clean();
Re: Limit Search, Ajax Search, Caching
If you tell CMSMS to cache a page, it will cache the page. If you want the comments to be rendered sort of "live" you need to disable the caching as the page with the comments inside may be different when called (if I'm correct). If you can, you should used a php cachng_mod for your web server (e.g. eAccelerator). If not provided by your host you need to install it (requires access to the real server).
This will cache bits of compiled php code until the values to compute have changed and can help to reduce render times in these conditions. Please keep in mind, as for any software with a certain degree of complexity, if you want speed and serve many people, you need appropriate server capacity and configuration.
Best
Nils
This will cache bits of compiled php code until the values to compute have changed and can help to reduce render times in these conditions. Please keep in mind, as for any software with a certain degree of complexity, if you want speed and serve many people, you need appropriate server capacity and configuration.
Best
Nils
Re: Limit Search, Ajax Search, Caching
I stated in my last post, how all CMSms pages will be cached fully, so not one query will be fired, and the comments are completely live though.
Re: Limit Search, Ajax Search, Caching
I'm still confused : an http request is either cached or not cached. It can't have one chunk cached (main content) and another chunk not cached (comments). An http request/response is somewhat atomic.
Pierre M.
Pierre M.
Re: Limit Search, Ajax Search, Caching
It's not about http-caching here. it's about caching the processing of the requested page so that there's no need for 30 mysql queries etc. and that IS possible. I thought you were the coders of the great cms and thus have to know complex problems^^
Re: Limit Search, Ajax Search, Caching
I understand better, thanks.
I'm only a support team member, not a coder. I can't tell if the /tmp/cache mechanism can currently achieve what you want. But I agree it should be possible if the cache stores the main content the template and the comments as separate things.
Hopefully someone with better under-the-hood knowledge will answer.
Pierre M.
I'm only a support team member, not a coder. I can't tell if the /tmp/cache mechanism can currently achieve what you want. But I agree it should be possible if the cache stores the main content the template and the comments as separate things.
Hopefully someone with better under-the-hood knowledge will answer.
Pierre M.
Re: Limit Search, Ajax Search, Caching
Hereistos,
on what kind of hosting plan are you (dedicated,shared,options, etc))? Can you configure the server yourself (webserver, php, mysqlserver and system)? This greatly influences the tuning options you have at hand.
Best
Nils
on what kind of hosting plan are you (dedicated,shared,options, etc))? Can you configure the server yourself (webserver, php, mysqlserver and system)? This greatly influences the tuning options you have at hand.
Best
Nils