[Seaside-dev] Issue with WARestfulHandler

Gerhard Obermann obi068 at gmail.com
Mon Apr 7 05:01:52 UTC 2014


Ups, that wasn't my latest version.
I think its the easiest way to always set the instVar if caching is
disabled.

routes
"Answer a collection of routes for the receiver."
^self shouldCacheRoutes
ifFalse: [ routes := self createRoutes ]
ifTrue: [  routes ifNil: [ routes := self createRoutes ] ]



On Sun, Apr 6, 2014 at 10:46 PM, Johan Brichau <johan at inceptive.be> wrote:

> Hi Gerhard,
>
> If you set the caching to false, you should also clear the cache, because
> also with your suggested change, when you re-enable the cache, you will get
> the old cached routes back again.
>
> But you are right that there is no support to turn off the cache or clear
> it, perhaps a #clearRoutesCache method is missing?
> If you want to turn off the caching, you would need invoke it too.
>
> Would that work for you?
>
> Johan
>
> On 06 Apr 2014, at 19:37, Gerhard Obermann <obi068 at gmail.com> wrote:
>
> > Hi,
> >
> > I would suggest to change the method "routes" see below.
> > The old method doesn't allow recaching of the instVar "routes", even if
> i set the shouldCacheRoutes to false.
> >
> > routes
> >       "Answer a collection of routes for the receiver."
> >
> >       ^ routes ifNil: [
> >               self shouldCacheRoutes
> >                       ifFalse: [ self createRoutes ]
> >                       ifTrue: [ routes := self createRoutes ] ]
> >
> > to
> >
> > routes
> >       "Answer a collection of routes for the receiver."
> >       ^self shouldCacheRoutes
> >                       ifFalse: [ self createRoutes ]
> >                       ifTrue: [  routes ifNil: [ routes := self
> createRoutes ] ]
> >
> > Cheers
> > Gerhard
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140407/ec8bc3eb/attachment-0001.htm


More information about the seaside-dev mailing list