Unfortunately, abort() is used for a variety of reasons, so it's  
impossible for cache_self() to know what the "right" thing to do is.

In this case you should probably just switch to using cache()  
manually, that way you can intentionally set the cache only when not  
aborting.

Jon

On Oct 28, 2007, at 8:03 PM, Vince Veselosky wrote:

> I don't know this is a bug, a feature, or just a pain in my neck.
>
> It seems that if you throw a clear_and_abort() (or a redirect(),  
> which calls clear_and_abort() internally) from within a component  
> that is calling $m->cache_self, the cache actually retains the  
> "contents" of the emptied buffer. That is, nothing. Future calls to  
> the same comp with the same cache key yield empty string.
>
> Is this behaving as designed? I could not find any documentation  
> defining what behavior I should expect under this circumstance. My  
> preference, of course, is that abort() and its brethren should  
> cancel caching of the current request. Is there any reason to cache  
> an empty value from an aborted request?
>
> -Vince
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a  
> browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/ 
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to