• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
      • From: Jakob Stoklund Olesen <email@hidden>
References: 
 >Who and why creates ~/Library/Caches/<my application> and how to stop it? (From: Andrei Tchijov <email@hidden>)
 >Re: Who and why creates ~/Library/Caches/<my application> and how to stop it? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
  • Next by Date: Re: How is procedure called according to cocoa espresso code
  • Previous by thread: Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
  • Next by thread: Re: Who and why creates ~/Library/Caches/<my application> and how to stop it?
  • Index(es):
    • Date
    • Thread