hgzimmerman / rocket-file-cache

An in-memory file cache for the Rocket web framework
MIT License
22 stars 6 forks source link

Fix performance for cache misses. #7

Closed hgzimmerman closed 6 years ago

hgzimmerman commented 6 years ago

Actually creating the in-memory file requires a copy. Serializing the file to a request requires another copy. That first copy should be avoided if possible.

So to bring cache misses more or less in parity with normal file reads do the following.

Also rename everything.