Re: MasonHQ node caching, and other bugs

Soren Dossing <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <20050526220803.N75182@localhost>
Yet another update.

I opened up Class::DBI. It has a clever way of caching data, and I observe 
that it only reads from database once for each node, and then never again. 
However, it will write data when there are updates.

Neither Class::DBI nor MHQ::Wiki::Node has a new() constructor. So 
apparently apache sets all the my() variables in each class when apache 
starts up, and then just calls methods. The variables in the two classes 
never gets cleared as long as apache keeps running.

How can I clear the variables in MHQ::Wiki::Node and Class::DBI at 
beginning of each request? I tried to move 'use MHQ::Wiki' out of 
handler-shared.pl and into htdocs/node/autohandler - but it didn't help. 
Another approach would be to just clear the cached data for a specific 
node at beginning of request, but I'm not sure how and where this could be 
done best; $node->retrieve_all in htdocs/node/autohandler didn't do the 
trick.

http://www.masonhq.com/ should have same caching problem, but somehow it 
doesn't.

Soren


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.