Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
- Subject: Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
- From: Andrei Tchijov <email@hidden>
- Date: Wed, 8 Nov 2006 10:50:46 -0500
[+NSURLRequest (id)requestWithURL:(NSURL *)theURL cachePolicy:
(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)
timeoutInterval ] looks promising, but none of possible values for
cachePolicy implies that data will not be cached at all. It looks
like the only thing you can control is should or should not cache
data be used to satisfy request.
typedef enum
{
NSURLRequestUseProtocolCachePolicy,
NSURLRequestReloadIgnoringCacheData,
NSURLRequestReturnCacheDataElseLoad,
NSURLRequestReturnCacheDataDontLoad,
} NSURLRequestCachePolicy;
On Nov 8, 2006, at 10:37 AM, John Stiles wrote:
stringWithContentsOfURL is a simple wrapper around WebKit.
If you want to customize the caching behavior, you could use WebKit
directly and then I am pretty sure that there are options to
control this sort of thing.
Unfortunately this might turn your one-liner into about a page of
code :|
http://developer.apple.com/documentation/Cocoa/Conceptual/
DisplayWebContent/index.html#//apple_ref/doc/uid/10000164i
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
Classes/NSURLRequest_Class/Reference/Reference.html
Andrei Tchijov wrote:
Hi,
I have a small GUI-less application which register itself to
listen for some system events and then communicate these events to
other application via [ NSString stringWithContentsOfURL: ... ].
While looking into some other issues I have discovered the whole
bunch of files in
~/Library/Caches/<my application name>
It is my assumption that these files are result of using
"stringWithContentsOfURL:". The question is, how to prevent this
from happening? In my particular case there is no reason
whatsoever to cache anything.
Your advice will be highly appreciated,
Andrei Tchijov
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden