At first I thought there was a caching issue on my end; either not refreshing the cache after submitting new data, or refreshing faster than it was taking for the system to register there was new data.
Upon further testing (get history data, submit new request data, get history data again) and logs, identified that the cache was indeed being refreshed, however the data being returned from Siebel was not up to date with the new entry.
Options:
- Disable caching entirely on the history calls (bad performance)
- Set a static cache refresh for an amount of time that they expect the new request to be included in history (still need the user to refresh the page after that amount of time)
Neither options are good. Either the whole process is slowed on purpose by X seconds, or stays fast but without the newly submitted data.
I decided to test how long it is between submitting the data and retrieving the history with the new data using sleep(). I incrementally tested times, staring from 2000ms (2 seconds) to 300000ms (5 minutes). After 5 minutes Siebel was still returning the history list without the newly submitted data.
That means there is not much point disabling caching since it won't make a difference over that extended amount of time, where our caching refresh is 10 minutes.
Not sure why Siebel has such a long delay between receiving data and having it available, it's something I will have to look in to.
***
Upon further investigation it appears the newly created submission actually does appear in the history list. Apparently Siebel is only returning the most recent 25 entries, however I was calculating whether the data had been submitted based on count (assuming the max number would increase with a new entry). Because the full history list isn't returned, it is necessary to look for the specific entry instead of relying on count.
Therefore it looks to be a caching issue after all. Looking into the controller to see if a databind refresh is possible after submission of the new entry.
***
Solution:
Implemented cache expiry functionality to invalidate all previous search results after submitting a new entry.
Upon further investigation it appears the newly created submission actually does appear in the history list. Apparently Siebel is only returning the most recent 25 entries, however I was calculating whether the data had been submitted based on count (assuming the max number would increase with a new entry). Because the full history list isn't returned, it is necessary to look for the specific entry instead of relying on count.
Therefore it looks to be a caching issue after all. Looking into the controller to see if a databind refresh is possible after submission of the new entry.
***
Solution:
Implemented cache expiry functionality to invalidate all previous search results after submitting a new entry.
No comments:
Post a Comment