Announcement Announcement Module
Collapse
No announcement yet.
JavaScript caching is not enabled in "production" mode Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaScript caching is not enabled in "production" mode

    I have switched the <mode> in my spring.xml file from "development" to "production" as follows:

    Code:
            <!-- Pick the mode: development, preview, production -->			    
            <mode>production</mode>
    I expected this to enable JavaScript caching for my JavaScript controllers under WEB-INF/webscripts*/*-get.js. From the debugger, I see that these controllers are instances of WebApplicationStoreScriptContext which has the following implementation for isCachable():

    Code:
            public boolean isCachable()
            {
                return false;
            }
    I was expecting the JavaScript controller to be an instance of ClassPathScriptLocation which IS cachable.

    Is there is a way to get my controllers to load as ClassPathScriptLocation (or another type) so that caching will be enabled rather than WebApplicationStoreScriptContext ?

    Thanks,

    Bob

    P.S. We are experiencing Surf performance issues in production. From jProfiler, I see that FreeMarker and JavaScript processing are CPU intensive.
    Last edited by BoJo; Jun 2nd, 2011, 01:14 PM.
Working...
X