<div dir="ltr"><div>Ups, that wasn't my latest version.</div><div>I think its the easiest way to always set the instVar if caching is disabled.</div><div> </div><div><div>routes</div><div><span class="" style="white-space:pre">        </span>"Answer a collection of routes for the receiver."</div>
<div><span class="" style="white-space:pre">        </span>^self shouldCacheRoutes</div><div><span class="" style="white-space:pre">                        </span>ifFalse: [ routes := self createRoutes ]</div><div><span class="" style="white-space:pre">                        </span>ifTrue: [ routes ifNil: [ routes := self createRoutes ] ]</div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 10:46 PM, Johan Brichau <span dir="ltr"><<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Gerhard,<br>
<br>
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.<br>
<br>
But you are right that there is no support to turn off the cache or clear it, perhaps a #clearRoutesCache method is missing?<br>
If you want to turn off the caching, you would need invoke it too.<br>
<br>
Would that work for you?<br>
<br>
Johan<br>
<div><div class="h5"><br>
On 06 Apr 2014, at 19:37, Gerhard Obermann <<a href="mailto:obi068@gmail.com">obi068@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I would suggest to change the method "routes" see below.<br>
> The old method doesn't allow recaching of the instVar "routes", even if i set the shouldCacheRoutes to false.<br>
><br>
> routes<br>
> "Answer a collection of routes for the receiver."<br>
><br>
> ^ routes ifNil: [<br>
> self shouldCacheRoutes<br>
> ifFalse: [ self createRoutes ]<br>
> ifTrue: [ routes := self createRoutes ] ]<br>
><br>
> to<br>
><br>
> routes<br>
> "Answer a collection of routes for the receiver."<br>
> ^self shouldCacheRoutes<br>
> ifFalse: [ self createRoutes ]<br>
> ifTrue: [ routes ifNil: [ routes := self createRoutes ] ]<br>
><br>
> Cheers<br>
> Gerhard<br>
</div></div>> _______________________________________________<br>
> seaside-dev mailing list<br>
> <a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
<br>
_______________________________________________<br>
seaside-dev mailing list<br>
<a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
</blockquote></div><br></div>