Connecting Tech Pros Worldwide Help | Site Map

Design pattern for file cache

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 01:59 AM
Leon Mergen
Guest
 
Posts: n/a
Default Design pattern for file cache

Hello,

I'm currently in the process of implementing a file cache, and am
looking for any existing design patterns. I hadn't had much luck with
google, is anyone aware of a good file cache pattern (in my case, I
think the update:request ratio is around 1:1000000).

Thanks in advance,

Leon Mergen


  #2  
Old July 23rd, 2005, 01:59 AM
davidrubin@warpmail.net
Guest
 
Posts: n/a
Default Re: Design pattern for file cache


Leon Mergen wrote:[color=blue]
> Hello,
>
> I'm currently in the process of implementing a file cache, and am
> looking for any existing design patterns. I hadn't had much luck with
> google, is anyone aware of a good file cache pattern (in my case, I
> think the update:request ratio is around 1:1000000).
>
> Thanks in advance,
>
> Leon Mergen[/color]

Your description is a little vague. What do you mean by a "file cache"?
A cache of the contents of a single file? A cache of access handles to
multiple files? What operations do clients of this cache require? You
need to be more specific. /david

  #3  
Old July 23rd, 2005, 01:59 AM
Leon Mergen
Guest
 
Posts: n/a
Default Re: Design pattern for file cache

On Sun, 2005-03-13 at 07:38 -0800, davidrubin@warpmail.net wrote:[color=blue][color=green]
> > I'm currently in the process of implementing a file cache, and am
> > looking for any existing design patterns. I hadn't had much luck with
> > google, is anyone aware of a good file cache pattern (in my case, I
> > think the update:request ratio is around 1:1000000).
> >[/color]
> Your description is a little vague. What do you mean by a "file cache"?
> A cache of the contents of a single file? A cache of access handles to
> multiple files? What operations do clients of this cache require? You
> need to be more specific. /david[/color]

Ah ok, I'm sorry.. :)

The cache should consist of the contents of image files; these image
files are requested by other classes inside the system. The cache should
ideally work with 'keys' based on file locations inside the system, so
yes, this cache would probably be based on handles to multiple files.
Since it is a multi-threaded server application, the cache should be
thread-safe (and since there are far more reads that updates, ideally
should be based on lock-free/wait-free synchronization).

The thing is, this whole thing isn't /that/ hard to implement, but my
experience with patterns is that they often keep certain aspects in
consideration that i didn't consider yet ... :)

Thanks in advance,

Leon Mergen



 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.