How can I clear a cached region from pl/sql running in a cron job? The APEX_UTIL.functions seem to only work within an apex app.
Application Express 4.2.3.00.08.
Could you explain what the underlying problem is that makes you think that this is a possible solution.
To me it doesn't make any sense to try to clear a client side cache from the server outside of the client context.
We have a long running batch job that produces several tables used for reporting at 6AM every morning. We have a number of cached APEX graphs and reports that 300 users access throughout the day. Thought there would be a simple procedure to run at the end of the batch job to clear the cached regions. Otherwise will have to build some logic in APEX app to sense when batch job completes and check when region cache was created and purge if earlier.
The Application Express engine only renders a region from cache if it meets the defined condition. Additionally, regions can be cached specific to a user or cached independent of a user.
Meaning that if the condition isn't met the region is rendered fresh.
If you hold the time the region was last freshly rendered in a page item and compare that to the time the job has finished you can get the region from cache when the job isn't finished jet.
Thanks for the reply Nicole.
Yes, but I was trying to avoid getting the cache date for every cached region and then querying the last batch run_date on every page. (Many pages with many regions per page) Seems like a lot of overhead and coding.
Instead, I now have the batch job update a 'CLEAR_CACHE' flag to 'YES' on a batch log table when job ends. Then added process to each page to check flag. If flag is 'YES' then purge all regions and set flag to 'NO'.