A slightly different approach, but similar result: in CODI we have a 
@RestScoped. This works as 'cache' on the bean level.

It is basically intended for backing beans which are served only by a single 
GET page. In that case the bean automatically expires once a single parameter 
of a f:viewParam changes. It has some restrictions, mainly that you must only 
use it from a single JSF page - but otherwise it works really well.


LieGrue,
strub




----- Original Message -----
> From: Jason Porter <[email protected]>
> To: "[email protected]" 
> <[email protected]>
> Cc: 
> Sent: Monday, December 17, 2012 5:45 PM
> Subject: Re: [JSF][Proposal] ViewMetaData for HTTP caching
> 
> I suggest making unit the enum and value the length, other than that it
> seems fine. Where would you be storing the cached version though?
> 
> 
> On Mon, Dec 17, 2012 at 9:37 AM, Thomas Andraschko <
> [email protected]> wrote:
> 
>>  Hi,
>> 
>>  sometimes it's required or possible to cache some views.
>>  We implemented a CODI ViewConfig based solution for this.
>> 
>>  Here is a prototype: https://gist.github.com/aab5992ab4cf5d22b2d3
>> 
>>  What do you think? Is this useful for other users too and can we maybe add
>>  it to DeltaSpike?
>> 
>>  @Gerhard
>>  Would it be possible to add a new method
>>           <T extends Annotation> T getUniqueMetaData(Class<T> 
> target)
>>  to ViewConfigDescriptor?
>>  Many custom ViewMetaData's are unique and so we must not create a 
> ArrayList
>>  each time.
>> 
>> 
>>  Regards,
>>  Thomas
>> 
> 
> 
> 
> -- 
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
> 
> Software Engineer
> Open Source Advocate
> 
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>

Reply via email to