Periodic refresh of cache
Hi
Will the below ensure that distributed (internal local cache scheme) is refresh at regular intervals by setting high-units, low-units to zero.
The use case is to expire all entries in cache at regular intervals, and reload them from cache store.
<distributed-scheme>
<scheme-name>example-distributed</scheme-name>
<service-name>DistributedCache1</service-name>
<backing-map-scheme>
<read-write-backing-map-scheme>
<scheme-name>DBCacheLoaderScheme</scheme-name>
<internal-cache-scheme>
<local-scheme>
<high-units>0</high-units>
<low-units>0</low-units>
<expiry-delay>60s</expiry-delay>
</local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>com.test.DBCacheStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>locations</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
<read-only>true</read-only>
<refresh-ahead-factor>0.5</refresh-ahead-factor>
</read-write-backing-map-scheme>
</backing-map-scheme>
<thread-count>10</thread-count>
<autostart>true</autostart>
</distributed-scheme>
I see with above config, that all objects are being expired at 60s(expiry delay) * .5 (refresh-ahead-factor) = 30 secs, (as low-units and max-units is set to zero). Please clarify if this configuration works in all cases.
Thanks
sunder
Hi sunder,
refresh-ahead does not on its own guarantees refresh.
Refresh-ahead is only ever consulted if there was a get()-like operation (read operation specifically directed against the entry... queries are not suitable for triggering refresh-ahead) against the entry within the interval designated by the refresh-ahead-factor.
Let's suppose you have refresh-ahead set to 0.25, and expiry-delay set to 1 minute, then if you have a get against the entry in the last 15 second (= 0.25 * 1 minute) before it expires, then there is going to be an asynchronous fetch of the entry from the cache store. This means that the triggering read will see the old value, but once the asynchronous fetch completes, it will replace the old value with the newly fetched value in the cache.
But if there are no triggering reads, then it will simply expire instead of refreshing.
Best regards,
Robert
Edited by: robvarga on May 9, 2011 1:56 PM
Similar Messages
-
Periodic refresh of a servlet..?
Hai people,
I have an appliaction scope object which is created using setAttribute mehod servletContext object. and the same can be retreived using getAttribute method of servletContext object.
I need to update the application scope object for every specified time interval. How can i periodically refresh my servlet such that my application scope object gets updated !! ??
Awaiting for ur replies !!
Thanks in advance,
Mani.Hello,
We are also very interested in such feature.
We periodically query some backend databases on their System Change Number (ora_rowscn) to discover inserted and deleted data. The scheduling is currently done with a Spring Framework Container that is embedded in the grid (1) but we would be very interested in having such scheduling integrated in the CacheStore API. This would help us to prevent execution of the same loading task on each node of the grid.
Our pattern today is :
1. create a Named Cache called "cache-loader" to:
** store the context of each loader (last-load-time, last-integrated-system-change-number, etc)
** prevent concurrent execution of a loader using an entryProcessor to send the task on the active node that holds the context
2. Associated each loader ("my-backend-1", "my-backend-2", etc) a key and context stored on the "cache-loader" NamedCache
** Sample : key="my-backend-1-loader", value = MyBackend1LoaderContext[lastExecutionTime,lastIntegratedSystemchangeNumber, ...]
3. Develop an EntryProcessor for each loader (e.g. "my-backend-1-loader") that queries the backend database using the last system change number to retrieve the modified data
4. Schedule the invocation of the the loader EntryProcessors via SpringFramework on each node of the grid
We are aware that our approach does not scale well, that the EntryProcessors are over invoked (once per node of the grid instead of once for the whole grid) . Our trick is the serialization of the entry processors, we look at the last execution time and decide to skip the loader's business logic if this is an over-invocation.
If the number of nodes of the grid increases to numbers that would make the over-invocation problematic, we will schedule the invocations on an external component but we prefer to group all the grid related business logic in the grid.
Cyrille
Cyrille Le Clerc
[email protected]
(1) http://coherence.oracle.com/display/COH35UG/Integrate+CacheFactory+with+Spring -
After REFRESH the cached object is not consistent with the database table
After REFRESH, the cached object is not consistent with the database table. Why?
I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
JDeveloper.
How to make the JDeveloper's offline tables to be synchronized with the underling database tables?qkc,
Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
John -
Periodical refresh of data on page or refresh on command?
Hi!
I have a start page in my application that displays data from a couple of iterators. This page is intended mainly to navigate to some tasks on this data but the task depends on the data itself. So I must ensure, that when the user clicks on a command link (let's saj in a table column) the data on that table is refreshed. I've been thinking about some functionality that would cause the data on the page to refresh periodically since there is also a picture displaying current positions of some transport units (either is there or it isn't, I don't need any real-time refreshing). Second option is to somehow refresh the needed iterator when user clicks the row since sometimes it happens that a user clicks on the link of the row but when the task is started the data is not from the row he clicked on but of a completely different record since there was some data change from another user that caused different row order in that table.
Please let me know what is the best way to deal with my requirement and if periodical refresh is OK, how to implement periodical refresh of the page or if concidering this advice: http://radio.weblogs.com/0118231/stories/2005/06/16/whyIsntRefreshingTheBrowserPageEnoughToRefreshTheDataDisplayed.html - refresh all iterators on the page.
I hope my question is clear.
Regards,
BB
BTW
Using ADF BC 10.1.3.3
Edited by: Brokenbone on Jul 22, 2009 11:41 AMHi,
I think you can use poll tag with interval and pollListener specified, you can find more details on below links
http://www.oracle.com/technology/pub/articles/jellema-muir-adf-part2.html
http://thepeninsulasedge.com/frank_nimphius/2007/09/18/adf-faces-using-afpoll-to-refresh-a-table
Sireesha -
Problem with Expiry Period for Multiple Caches in One Configuration File
I need to have a Cache System with multiple expiry periods, i.e. few records should exist for, lets say, 1 hour, some for 3 hours and others for 6 hours. To achieve it, I am trying to define multiple caches in the config file. Based on the data, I choose the Cache (with appropriate expiry period). Thats where, I am facing this problem. I am able to create the caches in the config file. They have different eviction policies i.e. for Cache1, it is 1 hour and for Cache2, it is 3 Hours. However, the data that is stored in Cache1 is not expired after 1 hour. It expires after the expiry period of other cache i.e.e Cache2.
Plz correct me if I am not following the correct way of achieving the required. I am attaching the config file here.<br><br> <b> Attachment: </b><br>near-cache-config1.xml <br> (*To use this attachment you will need to rename 142.bin to near-cache-config1.xml after the download is complete.)Hi Rajneesh,
In your cache mapping section, you have two wildcard mappings ("*"). These provide an ambiguous mapping for all cache names.
Rather than doing this, you should have a cache mapping for each cache scheme that you are using -- in your case the 1-hour and 3-hour schemes.
I would suggest removing one (or both) of the "*" mappings and adding entries along the lines of:
<pre>
<cache-mapping>
<cache-name>near-1hr-*</cache-name>
<scheme-name>default-near</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>near-3hr-*</cache-name>
<scheme-name>default-away</scheme-name>
</cache-mapping>
</pre>
With this scheme, any cache that starts with "near-1hr-" (e.g. "near-1hr-Cache1") will have 1-hour expiry. And any cache that starts with "near-3hr-" will have 3-hour expiry. Or, to map your cache schemes on a per-cache basis, in your case you may replace "near-1hr-*" and "near-3hr-*" with Cache1 and Cache2 (respectively).
Jon Purdy
Tangosol, Inc. -
Event-driven refresh of cached shared datasets
We have a growing business intelligence solution deployed on SQL Server 2008 R2. All reports are in SSRS and are executed via web browser by the end-users throughout the day.
We have been investigating how to improve performance and so far it appears that converting report datasets to shared datasets and then caching those shared datasets provides the greatest opportunity. (We can't snapshot or cache the individual reports
themselves as they all contain customized content based upon the end user's roles and permissions).
Creation of the shared datasets and setting them to be cached is easy, and we're seeing really nice performance improvements.
However, we haven't been able to find a way to refresh the cached data without using the SSRS calendar-based schedule. Our ETL process completes anywhere from 8 am to sometime after noon depending on data availability from source systems, so we can't
just pick a point in time to refresh the cached data.
Ideally we'd like to add commands to the end of the SSIS workstream that loads the database, and have these commands expire the existing cached datasets and refresh their data.
We've been able to use the SetCacheOptions stored procedure to expire the cached datasets, ensuring that the next run of the top-level report will pull new data - but the performance hit on that first execution is significant. We'd rather have the
caches refresh systematically when ETL completes so that our end users are always seeing the fastest performance with the most current data.Hi GottaLoveSQL,
As we know, there is no explicit setting for conditionally expiring the report cache. To work around this issue, you can use a stored procedure for the report dataset and create a parameter you can pass from the report to indicate that you should explictly
flush the report instance cache. Then, in the stored procedure, check this parameter and expire the cache using the sp_start_job. After that, in the SSIS package which performs the ETL process, add a SQL Task which start a subscription job which will reload
the dataset cache. For more information, please see:
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/eb0dd2a6-9d2f-4430-9e88-020377e4fafd.
Regards,
Mike Yin
TechNet Community Support -
Refresh toplink cache from tirgger
How to update the toplink cache due to change in the database by some external process or procedure?
This question was posted some time back and one of the suggestion was to create a trigger on the table holding the data and implement callout to the toplink cache to refresh. I will appreciate if any one can let me know where I can I find more information to implement such a callout method from trigger on the database table.
We are accessing the toplink objects from OC4J container from where a singleton is managing the calls to the toplink objects. We already have methods in place to refresh the cached object based on timeouts but now the new requirements are to refresh the objects only if the data is changed in the database.
Thanks
AhmadI have url error on this thread : How to refresh cache in TopLink, turn off cache
[b]Discussion Forums Error
We cannot process your request at this time. Please try again later.
Thank's -
How to refresh SLD cache ?
We have to change Business system names defined in SLD, we deleted Business systems and created them again.Still XI is picking name of the old system, which is clearly visible in sxmb_moni.
We executed sxi_cache, is there something else for refreshing SLD cache ?
regards
vishalTry SXI_CACHE / Goto - Business System / Delete Cache content.
regards,
Craig -
I am trying to use Refresh-ahead caching with JPACacheStore. My config backig-map config is given below. I am using the same JPA example as given in the Coherence tutorial. The cache is only loading the data from the when the server starts. When i change the data in the DB, it is not reflecting in the cache. I am not sure I am doing the right thing. Need your help!!
<backing-map-scheme>
<read-write-backing-map-scheme>
<!--Define the cache scheme-->
<internal-cache-scheme>
<local-scheme>
*<expiry-delay>1m</expiry-delay>*
</local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>com.tangosol.coherence.jpa.JpaCacheStore</class-name>
<init-params>
<!--
This param is the entity name
This param is the fully qualified entity class
This param should match the value of the
persistence unit name in persistence.xml
-->
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>com.oracle.handson.{cache-name}</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>JPA</param-value>
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
*<refresh-ahead-factor>0.5</refresh-ahead-factor>*
</read-write-backing-map-scheme>
</backing-map-scheme>
Thanks in advance.
JohnI guess this is the answer
Sorry for the dumb question :)
Note: For use with Partitioned (Distributed) and Near cache
topologies: Read-through/write-through caching (and variants) are
intended for use only with the Partitioned (Distributed) cache
topology (and by extension, Near cache). Local caches support a
subset of this functionality. Replicated and Optimistic caches should
not be used. -
Hi,
i need to refresh program cache.
My problem is:
- run the program
- call a FM
- change data
- call the FM (again) to refresh data.
The fm gets the old data.
How can I solve?This is the full source code...
FORM bom_carica_modello USING par_matnr
par_stlal
par_stlan
par_werks
CHANGING par_tab LIKE it_tab[]
par_wa LIKE wa_tab.
DATA: it_bom_item OCCURS 0 WITH HEADER LINE.
REFRESH it_bom_item.
DATA: BEGIN OF it_diba OCCURS 0.
INCLUDE STRUCTURE stpox.
DATA: END OF it_diba.
REFRESH it_diba.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
datuv = p_datuv
capid = 'PP01'
mehrs = ' '
mtnrv = par_matnr
stlal = par_stlal
stlan = par_stlan
werks = par_werks
TABLES
stb = it_diba
MATCAT =
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID 'ZM' TYPE 'S' NUMBER 099
WITH 'Alternativa richiesta come modello non valida'.
ENDIF.
REFRESH par_tab.
CLEAR par_wa.
LOOP AT it_diba.
IF it_diba-datub GE p_datub.
Cancella le posizioni scadute
CLEAR: par_wa.
MOVE-CORRESPONDING it_diba TO par_wa.
MOVE it_diba-meins TO par_wa-meins.
Conversione UM
CALL FUNCTION 'CONVERSION_EXIT_RUNIT_OUTPUT'
EXPORTING
input = it_diba-meins
LANGUAGE = SY-LANGU
IMPORTING
output = par_wa-meins.
APPEND par_wa TO par_tab.
ENDIF.
ENDLOOP.
ENDFORM. " carica_modello
I have also added a wait command, a commit work... but the problem still the same... -
Manually Refresh Toplink cache
Gurus,
Can we write some servlet which will alllow to manually refresh toplink cache, on click of button.
Do we have to change any settings in session.xml or server.xml.
Please point me in right direction.
Thanks
gbkThere is no straight forward way of refreshing all the objects in the cache (short of looping through all the objects in the cache and manually refreshing them).
The most common approach to this issue is to determine which queries need refreshing and refresh those.
If this solution isn't what you were looking for, please provide more detail and I will be happy to help you further.
Peter -
POWL: Refresh the cache results of POWL during page load.
Hi Friends,
I am using a feeder class for my POWL. Whenever the user clicks opens the POWL, he sees the cached data/results and he is expected to do a manual refresh to see current/new data. I want to eliminate this by refreshing the cache during the page load itself and show user current data. I already know about the exporting parameter in handle_action method which is used to do refresh. But it does not work in this case.
Pls help.Hello Saud,
In which release you are? in new release you can do refresh by personalization where options are there.
There are other options also to refresh
1) By passing URL parameter refreshA=X it will refresh all queies when loading
2) By passing refreshq=X, it will refresh the current query
best regards,
Rohit -
Error while refreshing the cache ...
Hi,
In cache R/3 side shows me two red triangles: unable to refresh content and an error during last update. The error id BUSINESS_SYSTEM and the message is: NO INTEGRATION SERVER.
Please help me resolve this.
Regards,
Mahesh.Hi Mahesh,
perform SLDCHECK even try this SXMB_AMD
pls do chk this links
/people/sravya.talanki2/blog/2005/12/02/sxicache--ripped-off
/people/sravya.talanki2/blog/2006/12/19/unable-to-read-integrationdirectoryhmiundocumented-bug-sxicache
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301290
/people/sravya.talanki2/blog/2005/11/03/cache-refresh-errors--new-phenomena
if found worth pls do the req
Thanx
Sampath -
Periodic refresh of Materialized View
Hi,
I am working in a Oracle database for Oracle E-Business Suite.
In the database we have a custom materialized view defined as follow:
CREATE MATERIALIZED VIEW APPS.XXCUS_NAME_MV
<...>
BUILD IMMEDIATE
REFRESH FORCE ON DEMAND
<....>
From the below SQL I learn that the MV was refreshed during the night, I assume this is every night since i have executed the query for the last several days.
SELECT OWNER, MVIEW_NAME, LAST_REFRESH_DATE, REFRESH_METHOD, REFRESH_MODE, BUILD_MODE
FROM DBA_MVIEWS
WHERE MVIEW_NAME LIKE 'XXCUS_NAME_MV%'
APPS
XXCUS_NAME_MV
10-10-2013 2:00:14
FORCE
DEMAND
IMMEDIATE
However, I cannot find anywhere how this refresh is scheduled by means of a job?
I tried below query but there are no scheduled jobs for DBMS_REFRESH.REFRESH or DBMS_MVIEW.REFRESH.
SELECT * FROM DBA_JOBS;
Does anyone has an idea how the MV is refreshed automatically (periodically) other tahn by jobs?
Thx!Try looking in the *_SCHEDULER_JOBS view. This is now the preferred means of scheduling jobs, though DBA_JOBs is still supported.
this link might give you a good start:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm -
EVDRE: refresh dimension cache files each time user saves or refreshes data
Hi experts,
We're facing a performance trouble with our input schedules, so we pretend to decrease response times.
We've noticed an unexpected issue when users work with input schedules. Each time they save or refresh data into any input schedule, it seems to execute a dimension files refresh. Since they push Save buton till standard success message appears, we see diferent text messages in excel messages bar, in the bottom of excel window. And for a while, we can see a message where we can read "Load dimension cache".
Does anyone know if this is an standar behaviour? Is there any way to avoid that, so we can decrease response time regarding input schedule performance?? Is there any dimension files refresh while we save data from an input schedule?
Thanks in advance.I see these, too, running Fx12 on Windows 7. They are described in the (extremely voluminous!) about:cache interface as page thumbnails. I've attached some screen shots.
The text is extremely difficult to see, so I don't know whether it is a serious privacy/security risk. I would be curious to know how long they linger.
I think these support the Windows feature of showing a preview of a window or tab when you float over a taskbar button. (No idea whether there is a similar preview feature on Mac.) This feature is not enabled by default; users need to enable it in about:config. However, add-ons may be able to use the thumbnails because they have privileged access to the cache.
(Note: This feature was added pursuant to [https://bugzilla.mozilla.org/show_bug.cgi?id=497543 497543 – Provide a thumbnail service]. It "landed" on or about Jan. 28, 2012, so its first appearance in a released version of Firefox might have been Fx12.)
Maybe you are looking for
-
Please help! OK I bought the ipod video. I loaded all the music from a friend's library (on my friend's computer) into the ipod and now come home, install the itunes on my computer, plug my ipod into my computer, see the library in faded lettering on
-
JSF layout driving me crazy!
I've been working hard on a jsf powered project manager and am running into some problems with IE compatability. I got everything aligned and positioned the way (more or less) I wanted it, but when I tested it against IE all hell broke loose (specifi
-
How to use web start call JMS -- new
Hello folks : This works okay when I run the clients from a command line, but when I deploy with Java Web Start 1.2, I get a message saying "Ignoring com/sun/jms/util/jms.properties due to exception "java.lang.NullPointerException", I've put jms_clie
-
Our client is using External Tax Calculation using Taxware. we have created a sales order on april 20 and billing is created on 22April. Since We have Tax holday on April 20, price is calculated without TAX in the order. But in billing Tax is redet
-
Backspace navigation key not working in web browser using linux, but does on windoze
using ubuntu 10.04 (lucid). when navigating a web forum, the backspace key (previous page) does not function. the scroll keys are a little jerky too. i have both 'use navigation keys' and 'smooth scrolling' enabled in options.