Out-of-process caches #5844
Replies: 11 comments
-
I have a question,
I interpret it this way:
The cache can be completely initialized at the startup of the application, by loading the objects from the database. Some implementations of the Caching test perform this caching preload, but do not interpret point iv in the same way as I do, by fetching the cached objects directly at each request. Other implementations go even further, and do without any caching system, by storing all instances of CachedWorld in a variable, and then using this variable for each request. This method avoids the unserialization step. What is the correct interpretation? |
Beta Was this translation helpful? Give feedback.
-
I can ask my question in a new issue if you wish, since I'm going a little off topic. |
Beta Was this translation helpful? Give feedback.
-
I think you interpreted it correctly, unless I'm missing something subtle. Are you hinting that you'd like to prohibit cache priming and ensure some number of cache misses during the test? |
Beta Was this translation helpful? Give feedback.
-
Correct
Correct
Correct
EDIT: (I never answered the question) I do not believe there is a "correct" interpretation. Each solution has a valid use case in real-world applications and often one will find a mix, or all, of these solutions is appropriate for a given project. Perhaps, a better answer would be that they are all "correct", and we need to distinguish the solutions for consumption (read: results website). We are working on fleshing out some flags to distinguish each of these scenarios. At present, we plan on supporting them all as At present, and this may change, we envision describing the flavors as: 1. in memory, 2. cache on app server, 3. cache on database server. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answers. But the direct query of a cache system (which assumes static data) is different and does not correspond to the same needs as the implementation of a database cache system, as well as the use of an in-memory cache, which requires a measured volume of data. |
Beta Was this translation helpful? Give feedback.
-
Is it ok to cache all world objects in an array so that array[i] gives direct access to the world object with id i ? |
Beta Was this translation helpful? Give feedback.
-
This is intended to be disallowed for the same reason. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I don't know Go very well, but I agree that those appear to be using plain old arrays, which I believe we want to expressly disallow. ping @michaelhixson for clarification on the rules. |
Beta Was this translation helpful? Give feedback.
-
And I think we also need a definition of 'plain key/value map and array'. What features do you require for it to be non-plain ? |
Beta Was this translation helpful? Give feedback.
-
Ping, I'd like to implement this test also, but my db cache mechanism internaly uses a key (query + parameters) / value (result + timestamp) pair, I do use this on production as thanks to Postgres notifications I can invalidade the cache only when the data changes. Is this allowed? |
Beta Was this translation helpful? Give feedback.
-
For the recently-added cached query test type, we expect two main categories of caches:
This issue is about out-of-process caches.
Those out-of-process caches can run in three ways:
Currently, only the first one is achievable without modifying the toolset, so that's what some frameworks have implemented. We feel this is the least realistic of the three ways to run an out-of-process cache.
Therefore, we propose the following:
Comments, questions, and alternative suggestions are welcome.
Beta Was this translation helpful? Give feedback.
All reactions