Enable Gateway to Request Cache Asynchronously - #756
Conversation
|
I don't think you need this PR too, you can combine them into one here You can also remove the file from this PR where you just have some placeholder code |
|
Hi Cormac, I have combined the "Enable Gateway to Read Cache" and "Enable Gateway to Request Cache Asynchronously" PRs into one PR here. I have also removed the getter.q file containing placeholder code from the "Add cacheConfig, setter process, getter script" PR. I have also addressed your other comments. |
|
|
||
| // Get location of cache config and load it in. | ||
| cacheconfiglocation:.proc.getconfigfile["cacheconfig.json"]; | ||
| cacheconfig:.j.k raze read0 hsym first cacheconfiglocation; |
There was a problem hiding this comment.
what is cacheconfig expected to look like? It's probably worthwhile having a template json file so developers know what should be in the file
|
|
||
| requestnewcache:{[cachename; args] | ||
| cachename:"myfirstcache"; | ||
| args:`cache1`cache2!(`a`b`c! 1 2 3;`d`e`f!4 5 6); |
There was a problem hiding this comment.
you're overwriting the args and cachename parameters here - if you want to give examples then use comments in the same format as the rest of the TorQ codebase to show what the parameters should look like
| cachename:"myfirstcache"; | ||
| args:`cache1`cache2!(`a`b`c! 1 2 3;`d`e`f!4 5 6); | ||
| processname:"AsyncCache"; | ||
| maincache:` sv (hsym `$cacheconfig`cacherootdir),(`$cachename),`$processname, "_", string .z.P; |
There was a problem hiding this comment.
related to the above - not sure what this is doing without knowing what should be inside cacheconfig
| requestnewcache:{[cachename; args] | ||
| cachename:"myfirstcache"; | ||
| args:`cache1`cache2!(`a`b`c! 1 2 3;`d`e`f!4 5 6); | ||
| processname:"AsyncCache"; |
There was a problem hiding this comment.
should processname be a parameter? Should the value be in lower case instead of CamelCase?
| cacheconfig:.j.k raze read0 hsym first cacheconfiglocation; | ||
|
|
||
| loadcaches:{ | ||
| cachename:"myfirstcache"; |
Enable Gateway to Request Cache Asynchonously as per Phase 3.1 of Anycache Project Plan.