467,888 Members | 1,654 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

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

Jul 23 '05 #1
  • viewed: 4587
Share:
2 Replies

Leon Mergen wrote:
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


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

Jul 23 '05 #2
On Sun, 2005-03-13 at 07:38 -0800, da********@warpmail.net wrote:
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).

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


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

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

43 posts views Thread by Davey | last post: by
9 posts views Thread by Hasan O. Zavalsiz | last post: by
10 posts views Thread by Saso Zagoranski | last post: by
2 posts views Thread by mrpubnight | last post: by
10 posts views Thread by vital | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.