[haXe] object that stays around between web requests?

Dennis dennis at works4me.com
Tue Aug 1 07:35:23 CEST 2006


Nicolas Cannasse wrote:
> This will not since you run multiple Apache processes/threads which 
> will have each their own "cache", with no way to keep all of them 
> synchronized. Also, you can't implement memory cache as a library like 
> Martin suggested since this would mean that it doesn't work if you 
> have several processes (Apache 1.3) or several machines (load-balancing).
>
> Once possibility would be to write a memcached (or similar tech) 
> wrapper that connects to a running server which is caching the data 
> into memory instead of using a database. It should offer better 
> performances than storing in the database but it's actually more 
> complicated.
>
> If you're after simplicity, using database to store sessions is the 
> way to go. neko.Web.cacheModule has other advantages, which is to 
> cache "static datas" which are read-only datas extracted from 
> XML/database when the application runs for the first time.

The second "problem" without some kind of common memory is database 
connection pooling...

What is the purpose of neko.Web.cacheModule()? Code is cached as opposed to?

Another question is - I've only dealt with Index.hx with static function 
main() doing things. From that I cannot understand the wider picture of 
server side development. Can someone point me to discussions about this 
topic, or can someone elaborate on this?

Dennis



More information about the Haxe mailing list