Thanks for the responses, I ended up writing a function similar to the inject/change node suggestion:
[{"id":"cd5e5637.8d0508","type":"tab","label":"simple cache","disabled":false,"info":""},{"id":"5b00ca3e.921a94","type":"inject","z":"cd5e5637.8d0508","name":"","props":[{"p":"topic","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"recall","payload":"bar-test","payloadType":"str","x":490,"y":160,"wires":[["8b8023ea.1baaa"]]},{"id":"82620f2c.d95f9","type":"inject","z":"cd5e5637.8d0508","name":"foo-test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"foo-test","payload":"fake string data","payloadType":"str","x":270,"y":180,"wires":[["8b8023ea.1baaa"]]},{"id":"8b8023ea.1baaa","type":"function","z":"cd5e5637.8d0508","name":"cache / recall","func":"if (msg.topic == \"recall\"){\n var topic = msg.payload\n var data = flow.get(\"cache.\" + topic);\n if(!data){\n node.error(\"no recall data for: \" + topic,msg);\n return null;\n }else{\n return data;\n }\n}else{\n flow.set(\"cache.\" + msg.topic,msg);\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":200,"wires":[["3ae504ff.be655c"]]},{"id":"3ae504ff.be655c","type":"debug","z":"cd5e5637.8d0508","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":200,"wires":[]},{"id":"6828e502.96caac","type":"inject","z":"cd5e5637.8d0508","name":"bar-test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"bar-test","payload":"{\"foo\":\"fake string data\",\"bar\":[1,1,2,3,5,8,13,21]}","payloadType":"json","x":270,"y":220,"wires":[["8b8023ea.1baaa"]]},{"id":"4d2f0308.f7978c","type":"inject","z":"cd5e5637.8d0508","name":"","props":[{"p":"topic","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"recall","payload":"foo-test","payloadType":"str","x":490,"y":120,"wires":[["8b8023ea.1baaa"]]}]This text will be hidden