so what you really want is a shared resource and not a page :)

-igor


On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:


the page has an associated markup. it has place holders for the content,
the
table of contents and a label (name of file of content). the <head> tag
contains references to css and javascript.

i think what i'd like is for the Page to be able to save the rendered
content and when called, to write the content to the servlet response,
stopping the request cycle.

igor.vaynberg wrote:
>
> if i got it right what you are doing is reading a bunch of files and
> combining the result
>
> now you dont want to use cache infront of the appserver because the page
> isnt really static like you said
>
> the page itself is just a label that spits out the result of the
> concatenated text correct? so there is little point to caching the page.
>
> what you really want to do is to cache the expensive operation which
isnt
> creating the page but loading/concatenating that text
>
> so what you do is create a concurrenthashmap that lives in application
> scope, this map will house the results of your loaded+concatenated text
> via
> softreferences
>
> so the model for you label becomes like this
>
> new abstractreadonlymodel() { Object getobject() {
>   Map map=getapplication().getcache();
>   Key key=..construct cache key used to identify the result
>   String text=map.get(key);
>   if (text==null) { text=constructcontent(); map.put(key, text); }
>   return text;
> }
>
> -igor
>
> On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>>
>>
>> i didn't follow. can you please elaborate? where will the map be used?
>>
>>
>> igor.vaynberg wrote:
>> >
>> > i wouldnt cache the page but i would cache the concatenated result
>> >
>> > you can have a concurrenthashmap in your application keeping
>> > softreferences
>> > to the concatted text
>> >
>> > will that work?
>> >
>> > -igor
>> >
>> >
>> > On 2/18/07, Ittay Dror <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> i read this post already ;)
>> >>
>> >> i don't want to add another framework on top of wicket
>> (reverse-caching
>> >> HTTP
>> >> accelerator). and my pages are not exactly static. i read several
>> static
>> >> files and combine them (i read the content from one file, a table of
>> >> contents from another and add a Label component whose value is the
>> file
>> >> name). once the page is assembled, it is stateless. So what I'm
>> looking
>> >> for
>> >> is saving the assembled code, so when the page is requested again,
the
>> >> saved
>> >> data is served, instead of going through the cycle flow again.
>> >>
>> >>
>> >> Jonathan Locke wrote:
>> >> >
>> >> >
>> >> >
>> http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket
>> >> >
>> >> > read post and comments.
>> >> >
>> >> >
>> >> > Ittay Dror wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> How can I cache rendered pages (the pages I want to cache are
>> composed
>> >> >> dynamically, but from a static content. So after composition they
>> >> rarely
>> >> >> (even never) change)?
>> >> >>
>> >> >> Thanks,
>> >> >> Ittay
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>>
-------------------------------------------------------------------------
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>>
-------------------------------------------------------------------------
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to
share
>> > your
>> > opinions on IT & business topics through brief surveys-and earn cash
>> >
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > _______________________________________________
>> > Wicket-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
-------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033245
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to