[opencms-dev] Question about creation/reuse of template classes
mi.schmitt at gmx.de
Mon Jun 16 13:13:02 CEST 2003
I posted this question already last week, but there were no responses.
I don't know why.
Is my english too bad?
Is the problem not clearly described?
It would be nice if someone will, at least, tell my why my posts are
Here is my question once again:
I wrote several template classes.
Some of them will be cached dependent on some parameters.
Others should never be cached.
The caching mechanism works as I expected (several variants
have been created dependent on different parameters).
But for the templates that should not be cached, I am uncertain
about the creation of new instances of my template class. It
seems to me as if a new instance is created for every call (every
web-call of a page that uses the corresponding template).
But I would like to have that for every call the same instance will
Is this somehow (cofiguration, programming) possible?
A second question (that is only relevant if no new instance will
be created for every call) is about thread-safety of the template
Does OpenCms ensures that only one thread accesses the
getContent() method of the template classes?
Or do I have to take care for thread-safety on my own (for example,
through synchronisation of the getContent() method)?
Thanks in advance for every reply,
More information about the opencms-dev