Results 1 to 1 of 1

Thread: JavaScript caching is not enabled in "production" mode

  1. #1

    Default 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 at 12:14 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •