0
votes

I have a business scenario where, whenever a new record is loaded into a DB table, a) A notification will be sent to the client. Notification message is to convey data is loaded and ready for querying. b) Upon receiving the notification, the Client will make an OData query to the JBOSS vitrual DB. Odata is supported by Teiid VDB

Problem is that: The new records (inserted via manual/automated SL script) that are not returned in the ODATA query response. It is always returning the cached result for first 5 minutes. Because the Odata has a default cache time setting to 5 minutes.

We want TEIID to always return all the records including the newly inserted one.

I tried the following option but it is not working as expected (https://developer.jboss.org/wiki/AHowToGuideForMaterializationcachingViewsInTeiid) 1) Cache hints /*+ cache(ttl:300000) */ select * from Source.UpdateProduct
2) OPTION NOCACH

**** This works when I make a JDBC query to the DB.

Please suggest, how to turn off this caching in case of ODATA REST query ?

1

1 Answers

0
votes

I think Teiid documentation https://docs.jboss.org/author/display/TEIID/OData+Support could help. You don't specify version of Teiid you use, so I enclose the most current version's documentation.

Now when you go through the docs page, at the bottom there is section Configuration, where there are several configurable options. Doesn't the skiptoken-cache-time option serve your need? Try setting it to lower value/zero and see if this helps. Just locate the odata war, open it, and change the WEB-INF/web.xml file.

Jan