I need a C programmer to implement a persistent, non-volatile, LRU + LFU write-back cache algorithm.
1. Must compile with MS Visual C++ 2008 and later, compile targets 32 and 64 bit X86
2. Must be 100% portable and byte-compatible between compilers and X86 / X64 targets.
3. Must support both write-back and write-through write caching (selectable at any time)
4. Cache will NOT be stored in RAM - RAM usage should be kept down to a minimum - Actual storage is a file on a disk
5. The algorithm will cache fixed size blocks with some attributes - the solution must declare the attribute structures and implement what it needs to work, but leave room for additional attributes
6. The algorithm to be implemented is LRU + LFU (or better) with a fixed (but modifiable) factor of relevance between the two
6. Write-back cache must be prepared for possible power outage and commit the relevant blocks to actual storage on next load
7. The actual I/O functions are not part of this project. The algorithm should provide methods for cache lookup, cache store (R/W), write cache flush and parameter change
Expected result is a fully working, well-commented, compilable source using no additional libraries and not violating any existing copyrights. Copyright will be transferred to me upon project completion. This is part of a larger closed-source project.