[seaside] caching problem
fzak at sazasolutions.com
Thu Oct 26 14:48:17 UTC 2006
The static content, the gifs, change, that is, for instance: where I must have an edit gif, appears anything else, for instance a delete gif.
What apperars mixed-up in the web brwoser are the gif, the server static files, which I cache its byteArrays in ScriptingSystem formDictionary.
For instance, by means of "toggle halos", and "S" I can see the html generated by the server, this is a piece of html:
<img border="0" alt="" src="/seaside/DES?_s=VmTXqtlZoqwPFQvv" />
"/seaside/DES?_s=VmTXqtlZoqwPFQvv" referes to the gif, for instance to the gifA, and the gifA is shown.
Somehow, the same ?_s=VmTXqtlZoqwPFQvv after some time referes to another gif, a gifB. If I click the web brower refresh button, or delete all off-line content of temporary internet files every time or -as I´m trying now- change the expiration time to a shorter time, It seems I´m avoiding this... but I´m not sure.
Philippe Marschall <philippe.marschall at gmail.com> escribió:
2006/10/25, saza solutions :
> Hi all,
> This is the first time I make a submition to the list.
> For the last year and a half I´ve been using seaside in squeak, and built a
> decision engine application.
> I´ve been experiencing the following: all the gifs appeare mixed up.
> I cache the gifs, putting all the gifs in ScriptingSystem formDictionary, I
> store the byteArray directly.
> I realized that the application has been using offline content stored in the
> temporary files folder. Then, I change Explorer setting to check the version
> of a page, every time the page is visited (the previous setting was
> "automatic"). But I continued experiencing the problem.
> Then I realized that the key generated in WAExternalID by means of:
> GeneratorMutex critical:
> [1 to: self size do: [:i | self at: i put: ((($a to: $z), ($A to: $Z))
> atRandom: Generator) asInteger]]
> was exactly the same as one located in the temporary files.
> I also saw that WADocumentHandler>>response sets an expiration time to year
> | response |
> response _ WAResponse new.
> response contents: self mimeDocument contentStream text.
> response contentType: (mimeType ifNil: [self mimeDocument contentType]).
> response headerAt: 'Expires' put: 'Thu, 01 Jan 2095 12:00:00 GMT'.
> fileName ifNotNil:
> [response headerAt: 'Content-Disposition' put: 'attachment; filename=' ,
> ^ response
> Now, I´m attacking the problem in the following ways:
> - changes the web browser setting to review page version every time is
> - changed expiration time to a shorter time.
> - changed the way WAExternalID is generated, trying to make it more random.
> Does anybody has another ideas ?, Am I facing the problem correctly ?,
> Thanks in advance,
> I´d like to add that Seside is an amazing and productive framework.
Whats the bigger problem you're trying to solve? Serve static files?
Serve dynamically generated files?
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Seaside