Persistant Data Structure?
| From: | Steve | Date: | Wed, 30 Jan 2002 09:00:49 +0000 |
| Subject: | Persistant Data Structure? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2615@lists.php.net to get a copy of this message | ||
I know this question is not entirely smarty related, but it could be...
In Java Servlets, there is an init() method that is called the first time
the servlet is called. If a database query were to fill an array of data in
this init() method - that array would not change for the life of that
process. It can be accessed as many times as needed. Because it is in RAM,
it is obviously very fast.
So, my question is: Can this init() type functionality be implemented? In
smarty or some other way?
My major project is a catalog type site. I load several arrays with data on
each page view from the database. This particular data only changes every
few days. To me, this would be a huge performance gain.
OR, is there a way to get the caching to do what I want?
Thank you,
Steve