Skip to content

Enable Gateway to Request Cache Asynchronously - #756

Open
bsofjan wants to merge 2 commits into
DataIntellectTech:masterfrom
bsofjan:enablegatewaytorequestcacheasync
Open

Enable Gateway to Request Cache Asynchronously#756
bsofjan wants to merge 2 commits into
DataIntellectTech:masterfrom
bsofjan:enablegatewaytorequestcacheasync

Conversation

@bsofjan

@bsofjan bsofjan commented Aug 6, 2026

Copy link
Copy Markdown

Enable Gateway to Request Cache Asynchonously as per Phase 3.1 of Anycache Project Plan.

@CJA18

CJA18 commented Aug 13, 2026

Copy link
Copy Markdown

I don't think you need this PR too, you can combine them into one here
https://github.com/DataIntellectTech/TorQ/pull/755/changes

You can also remove the file from this PR where you just have some placeholder code
https://github.com/DataIntellectTech/TorQ/pull/743/changes#diff-be5c3f83a3ca984622a3bdba850b138fe9358babca505e43756f164468af0f9b

Comment thread code/common/getter.q Outdated
Comment thread code/common/getter.q
Comment thread code/common/getter.q
@bsofjan bsofjan changed the title Enable Gateway to Request Cache Asynchonously Enable Gateway to Request Cache Asynchronously Aug 19, 2026
@bsofjan

bsofjan commented Aug 19, 2026

Copy link
Copy Markdown
Author

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.

Comment thread code/common/getter.q

// Get location of cache config and load it in.
cacheconfiglocation:.proc.getconfigfile["cacheconfig.json"];
cacheconfig:.j.k raze read0 hsym first cacheconfiglocation;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread code/common/getter.q

requestnewcache:{[cachename; args]
cachename:"myfirstcache";
args:`cache1`cache2!(`a`b`c! 1 2 3;`d`e`f!4 5 6);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread code/common/getter.q
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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to the above - not sure what this is doing without knowing what should be inside cacheconfig

Comment thread code/common/getter.q
requestnewcache:{[cachename; args]
cachename:"myfirstcache";
args:`cache1`cache2!(`a`b`c! 1 2 3;`d`e`f!4 5 6);
processname:"AsyncCache";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should processname be a parameter? Should the value be in lower case instead of CamelCase?

Comment thread code/common/getter.q
cacheconfig:.j.k raze read0 hsym first cacheconfiglocation;

loadcaches:{
cachename:"myfirstcache";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cachename as a parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants