If you cached the values no distinction between post or get matters. you 
fetch them one-time only. 
If you don't want to cache them, it's another story

Basic workflow

- requesting values
- form = FORM()
- users press submit (form.process)
- re-requesting values (your unfortunate case)
- process the values sent by the form

But, you are afraid that requesting values from db 2 times is too much 
(sound like premature optimization, but anyway, let's go with it). 
You did

if post_vars
      process the values sent
else
   fetch values
   form = FORM()

This leaves you with open doors to XSRF and double submissions (not using 
form.process or form.accepts). 
You can still skip the fetch part if the page has been POSTed (don't need 
for default values at that point), so the logic goes this way

if page is GETted
    fetch values
    form = FORM()
    user press submit (form.process)
else (page is POSTed)
     don't fetch the data
     process the values from the form

-- 



Reply via email to