×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    161

    Remove old cache files.

    Hello!
    Please, help me to decide how to implement file-caching.

    Now my application writes all data to single folder, named for example TEST1. But unfortunately, storage space is limited, and I have to clear old (may be non-frequently used) files.

    How fast sill be to enumerate through all files inside TEST1 and check total size? And then delete less frequently used file? Can I call this routine each time I am going to save file?

    Or is there any other better way to cache files? (for example to store file list in memory)

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Remove old cache files.

    It does not make much difference, though personally I would scan the list at startup, though its hard to say without an estimate of the number of files that are there. Since its a single folder, there is a single IPC call to the file server so there is little advantage in caching the filenames somewhere especially since you will probably need to revalidate the file integrity on startup anyway.

    I would scan the list at statup then keep the cache in sync with your app.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    161

    Re: Remove old cache files.

    Thank you. As always - the simplest solution is the better one.
    Last edited by StasV; 2009-09-22 at 11:09.

Similar Threads

  1. RFileLogger missing output and locking files?
    By firewolf in forum Symbian
    Replies: 5
    Last Post: 2008-07-23, 11:39
  2. Remove runtime generated files in update
    By kdurga in forum Symbian
    Replies: 4
    Last Post: 2008-07-03, 14:02
  3. Data files in SIS / emulator with Carbide C++
    By jonmccune in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-06-29, 21:36
  4. Replies: 2
    Last Post: 2006-04-12, 11:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •