Results 1 to 2 of 2

Thread: caching issues...

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    11

    Default caching issues...

    I have a jsp form that has two submit buttons; save and reset. The
    form submits to a SimpleFormController with the following onSubmit
    method:

    Code:
    public ModelAndView onSubmit(...) throws Exception {
    
       if (request.getParameter("reset") != null) {
           this.settingsManager.reset();
       }
       else {
           this.settingsManager.setSettings((Settings) command);
       }
    
       return new ModelAndView(new RedirectView(this.getSuccessView()));
    }
    The success view for this controller is a redirect to a Controller
    with the following handleRequest method:

    Code:
    public ModelAndView handleRequest(...) throws Exception {
       return new ModelAndView("addressList", this.settingsManager().getSettings());
    }
    So, when the user hits the save button, the settings form is submitted
    and the settings manager sets the Settings to the given command
    values. When the user hits the reset button, the settings manager
    sets the Settings to their default values. Everything works fine,
    except that when the reset submit button is hit, the resulting view is
    pulled from Spring's cache instead of being re-generated. The user
    sees the old settings instead. This does not happen when the user
    hits save though. The new settings are seen in the view.

    What's going on here? Am I supplying enough info? I've looked all
    through the API and the documentation. I don't see anything about
    troubleshooting caching. I tried adding this.preventCaching() in my
    SimpleFormController, but it didn't change anything. Any ideas?

    Thanks,
    Brian

  2. #2
    Join Date
    Oct 2004
    Location
    Rotterdam, Netherlands
    Posts
    90

    Default

    Can you submit your configuration for the controllers?

Similar Threads

  1. Issues with multithreading and controllers?
    By brianstclair in forum Web
    Replies: 16
    Last Post: Feb 19th, 2010, 10:57 AM
  2. Replies: 5
    Last Post: Oct 8th, 2006, 12:39 PM
  3. Replies: 1
    Last Post: Sep 22nd, 2005, 02:31 PM
  4. strategies for caching persistent data
    By news in forum Architecture
    Replies: 3
    Last Post: Jan 14th, 2005, 02:10 PM
  5. AOP/Attributes-based caching
    By alruiz15 in forum AOP
    Replies: 0
    Last Post: Oct 5th, 2004, 07:34 AM

Posting Permissions

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