<div dir="ltr"><div>Ups, that wasn&#39;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>&quot;Answer a collection of routes for the receiver.&quot;</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">&lt;<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>&gt;</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 &lt;<a href="mailto:obi068@gmail.com">obi068@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I would suggest to change the method &quot;routes&quot; see below.<br>
&gt; The old method doesn&#39;t allow recaching of the instVar &quot;routes&quot;, even if i set the shouldCacheRoutes to false.<br>
&gt;<br>
&gt; routes<br>
&gt;       &quot;Answer a collection of routes for the receiver.&quot;<br>
&gt;<br>
&gt;       ^ routes ifNil: [<br>
&gt;               self shouldCacheRoutes<br>
&gt;                       ifFalse: [ self createRoutes ]<br>
&gt;                       ifTrue: [ routes := self createRoutes ] ]<br>
&gt;<br>
&gt; to<br>
&gt;<br>
&gt; routes<br>
&gt;       &quot;Answer a collection of routes for the receiver.&quot;<br>
&gt;       ^self shouldCacheRoutes<br>
&gt;                       ifFalse: [ self createRoutes ]<br>
&gt;                       ifTrue: [  routes ifNil: [ routes := self createRoutes ] ]<br>
&gt;<br>
&gt; Cheers<br>
&gt; Gerhard<br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside-dev mailing list<br>
&gt; <a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
&gt; <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>