Re: caching parsed XML files as DOM objects in memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Petr Smith wrote:
is it possible to cache parsed XML files somehow? I'm writing template library based on XML. But it's not very efficient to create new DomDocument, load XML template, process it and show on every page hit. XML parsing is not very fast, and because I'm parsing XHTML with entities, all DTD's are parsed too. I thought about something similar to java - there I can have servlet which lives all the time the server lives. It can load XML and parse it only for the first time and send DOM objects to another servlets.
I need something similar with PHP, can it be done?

This question seems to come up every other week on this list. Have a look at APC[1]; you can cache objects with its apc_store() and apc_fetch() functions.

[1] http://php.net/apc
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux