|
| <prev next> |
[xmlc] DocumentLoaderImpl Cache Keys: msg#00000java.enhydra.xmlc
Here's my problem... I want to switch which html file is used for a given generated interface X based on some request values. I've gotten this ALMOST working by extending StandardDocumentLoader and overriding getSourceFileName(Class). The problem is that this value is then cached in the DocumentLoaderImpl superclass. Then, when I make another request that should use a different html file for interface X, it uses the first html file that it already has cached. I propose slightly changing how DocumentLoaderImpl makes cache keys. If --- protected CacheEntry getCacheEntry(Class docClass) { String name = docClass.getName(); ... } --- was changed to --- protected String makeCacheKey(Class docClass) { return docClass.getName(); } protected CacheEntry getCacheEntry(Class docClass) { String name = makeCacheKey(docClass); ... } --- then I could simply override makeCacheKey() and make it unique for each of my html files. Does that sound okay? Am I going about it all wrong? The other option would be to make the templateCache member variable protected, and then I could just duplicate getCacheEntry() and tweak it to my needs. Thanks in advance, Erik -- You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list. To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | Re: [xmlc] DocumentLoaderImpl Cache Keys, Jacob Kjome |
|---|---|
| Next by Thread: | Re: [xmlc] DocumentLoaderImpl Cache Keys, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |