Announcement
Collapse
No announcement yet.
change to VVOUT data structure
Collapse
X
-
Yes, "useCacheIfExists" was removed for the final version as we determined that it did not serve much purpose.
"useCacheIfExists" was checked within the vvOut module but at that point your program would have already gone through the processing of building up the data...thus not taking the advantage of sending back a cached response.
All of the cache related fields have not been documented within vvOut as this feature has not been "officially" introduced however is in a workable state.
The method for using the cache is as follows:
Code:if not vvUtility_sendCache('YOURCACHEKEY'); // process your data... // vvOut.cache = 'Y'; vvOut.cacheKey = 'YOURCACHEKEY'; vvOut.cacheExpire = %timestamp() + %days(30); // or however long vvOut_execSqlToJson(vvOut:stmt); endif;
Code:** -------------------------------------------------------------- p vvUtility_sendCache... p b export d pi n d inKey 30a const varying options(*varsize) /free if not %open(vvche100); open vvche100; endif; chain (inKey) vvche100; if not %found(vvche100); return FALSE; else; // ensure that this is not expired... // if %timestamp() > vvexpire; delete che100; reade (inKey) vvche100; dow not %eof(vvche100); delete che100; reade (inKey) vvche100; enddo; return FALSE; else; unlock vvche100; vvOut_data(vvdata:vvtype); reade(n) (inKey) vvche100; dow not %eof(vvche100); vvOut_data(vvdata); reade(n) (inKey) vvche100; enddo; endif; endif; return TRUE; /end-free p e
-
Sean,
Thanks for your reply. My concern is that any changes to data structures used by user programs be documented or at the very least an advice to recompile programs be issued whenever such changes are implemented in new releases. Like that we know what to expect and can be proactive when we upgrade.
-thanks,
Hugo.
Comment
-
Hi Hugo,
I understand your concern. Our process of adding new fields to the structures have always been to add to the bottom and then subtract from the "fill". This was the first case (and should be the last) of ever removing a field. We only felt comfortable making this change because it was only released in a beta version. Sorry for the confusion...if this is ever the case again, we will be sure to include instructions in the release notes.
Comment
Comment