473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
2 4831

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BlueMonkMN | last post by:
I've been trying to think of the right way to design relationships between objects with different desired lifetimes that raise events. If an event source is a relatively permanent object and the...
43
by: Davey | last post by:
I am planning on developing an application which will involve skills that I have very little experience of - therefore I would appreciate comments on my initial design thoughts. Overview on...
9
by: Hasan O. Zavalsiz | last post by:
Hi , i am trying to figure out which approach is better to use . let me explain the scenario. i am using the "Nortwind" database . in this database i have "Customers " table .The following is the...
10
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post...
2
by: mrpubnight | last post by:
Hello everyone I'm hoping someone with more experience can suggest how I would go about designing the following: We have a standard web application and in its current form there are no distinct...
4
by: Guch Wu | last post by:
I want to design an image processing class as follow: class Image { Image Data; General Image Operations; read(filename, File_Type); write(filename, File_Type); };
3
weaknessforcats
by: weaknessforcats | last post by:
Design Pattern: The Singleton Overview Use the Singleton Design Pattern when you want to have only one instance of a class. This single instance must have a single global point of access. That...
0
weaknessforcats
by: weaknessforcats | last post by:
Design Patterns: Visitor Introduction Polymorphism requires a class hierarchy where the interface to the hierarchy is in the base class. Virtual functions allow derived classes to override base...
10
by: vital | last post by:
Hi, I am designing the middle tier of a project. It has 6 classes and microsoft application data access block. The six classes are DBServices, Logger, ProjectServices ... etc. and all these...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.