Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In addition to the race condition problems people have mentioned, you are asking for a number of other problems.</p> <p>First off, a cache without a cache lifetime policy has a name -- we call caches that grow without bound and never release their data "memory leaks". They have a way of bringing servers to their knees. Think hard about how you're going to know when your cache is getting too big and its time to throw it away.</p> <p>Second, caches are worse than useless if they are liars. Your cache alleges to be a speedup over the file system, but exactly what mechanism do you propose to keep the cache and the file system consistent? Suppose a user accesses a file, the information gets cached, and then some other operation deletes that file. Now the cache is out of sync with the thing is is supposed to be abstracting over; this sounds like a potential source of bugs. The next time someone accesses that file, the cache is going to say that it exists even though it does not any longer.</p> <p>These are of course solvable problems; the question is not whether they are solvable, but rather, whether the expense of solving them is going to be paid for by the increase in performance you eke out. </p> <p>Or, you could ignore these problems and hope for the best. For example, if you believe that the cost of running into a memory leak or cache inconsistency is a cost of doing business that the increase in performance pays for. If that's the case then it would be wise to intentionally make the decision to take a brittle low-cost solution, rather than doing so accidentally and being surprised later when things break.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload