Do not cache processed template content. It is rarely needed and not that expensive
to produce. Also fixes bug 149, hsp templates not updated.
This commit is contained in:
parent
1cdb1d6199
commit
3b6c99a2f5
1 changed files with 2 additions and 8 deletions
|
@ -24,7 +24,6 @@ import helma.framework.core.*;
|
|||
|
||||
public class Template extends ActionFile {
|
||||
|
||||
String processedContent = null;
|
||||
|
||||
public Template (File file, String name, Prototype proto) {
|
||||
super (file, name, proto);
|
||||
|
@ -34,7 +33,6 @@ public class Template extends ActionFile {
|
|||
super (content, name, sourceName, proto);
|
||||
}
|
||||
|
||||
|
||||
public String getFunctionName () {
|
||||
return name;
|
||||
}
|
||||
|
@ -45,9 +43,6 @@ public class Template extends ActionFile {
|
|||
|
||||
public String getContent () {
|
||||
|
||||
if (processedContent != null)
|
||||
return processedContent;
|
||||
|
||||
Vector partBuffer = new Vector ();
|
||||
String cstring = super.getContent();
|
||||
char[] cnt = cstring.toCharArray ();
|
||||
|
@ -149,8 +144,7 @@ public class Template extends ActionFile {
|
|||
}
|
||||
// templateBody.append ("\r\nreturn null;\r\n");
|
||||
|
||||
processedContent = templateBody.toString ();
|
||||
return processedContent;
|
||||
return templateBody.toString ();
|
||||
}
|
||||
|
||||
public void remove () {
|
||||
|
|
Loading…
Add table
Reference in a new issue