Hi Shazni, I checked the code for removeCache method and found that cacheKey is calculated as below.
*String connectionId = (dataBaseConfiguration.getUserName() != null? dataBaseConfiguration.getUserName().split("@")[0]:dataBaseConfiguration.getUserName()) + "@" + dataBaseConfiguration.getDbUrl(); cacheKey = RegistryUtils.buildRegistryCacheKey(connectionId, tenantId, path);* But in registry.xml we have below element too, *<cacheId>root@jdbc:mysql://mysql1.appfactory.private.wso2.com:3306/dbGovernanceCloud <http://mysql1.appfactory.private.wso2.com:3306/dbGovernanceCloud></cacheId>* Shouldn't we read the cacheId element first and calculate as above if cacheId element is not defined? Or did I misunderstand the configuration? thank you. On Wed, Nov 12, 2014 at 2:23 PM, Shazni Nazeer <sha...@wso2.com> wrote: > Hi, > > Given that we know the registry path of the resource of which cache to be > deleted and have an instance of the registry we can manually delete the > cache with a method like removeCache in the below file. However, it's not a > clean or correct way of manipulating the registry cache. > > > https://github.com/wso2-dev/carbon-governance/blob/master/components/governance/org.wso2.carbon.governance.custom.lifecycles.checklist/src/main/java/org/wso2/carbon/governance/custom/lifecycles/checklist/util/LifecycleBeanPopulator.java > > Shazni Nazeer > > Senior Software Engineer > > Mob : +94 777737331 > LinkedIn : http://lk.linkedin.com/in/shazninazeer > Blog : http://shazninazeer.blogspot.com > > On Wed, Nov 12, 2014 at 1:48 PM, Dimuthu Leelarathne <dimut...@wso2.com> > wrote: > >> Hi Pulasthi, >> >> So when we are doing global invalidation, what is the method we are going >> to use to invalidate the cache within the JVM? :) Or are you going to do it >> by magic? >> >> thanks, >> dimuthu >> >> On Wed, Nov 12, 2014 at 1:36 PM, Pulasthi Supun <pulas...@wso2.com> >> wrote: >> >>> Hi Dimuthu, >>> >>> >>> >>> On Tue, Nov 11, 2014 at 4:17 PM, Dimuthu Leelarathne <dimut...@wso2.com> >>> wrote: >>> >>>> Hi, >>>> >>>> >>>> >>>> On Tue, Nov 11, 2014 at 3:43 PM, Pulasthi Supun <pulas...@wso2.com> >>>> wrote: >>>> >>>>> Hi Dimuthu, >>>>> >>>>> On Tue, Nov 11, 2014 at 2:05 PM, Dimuthu Leelarathne < >>>>> dimut...@wso2.com> wrote: >>>>> >>>>>> Hi Pulasthi, >>>>>> >>>>>> Yes. We do not need global invalidation (although it would solve the >>>>>> problem), but the request is to sink AF Registry cache with the DB. We >>>>>> are >>>>>> in the same JVM, and we need a method/way to tell registry remove this >>>>>> particular path from Registry path cache. >>>>>> >>>>> >>>>> Such a method would need to be accessed through something like the >>>>> remote registry right?. The Registry api does not provide such a method to >>>>> remove entries from the Registry cache. >>>>> >>>> >>>> It should not be remote. An OSGi level method would be fine. Is there a >>>> way to patch the registry that we use? >>>> >>> >>> I talked with Azeez regarding this. He also agrees that providing such a >>> method to manipulate the cache is wrong. We need to think of some other >>> solution for this. I am not sure if the global cache invalidation has >>> completed or can be backported into 4.2.0. >>> @Amal is the work on that complete ? >>> >>> Regards, >>> Pulasthi >>> >>>> >>>> thanks, >>>> dimuthu >>>> >>>> >>>>> >>>>> Regards, >>>>> Pulasthi >>>>> >>>>>> >>>>>> thanks, >>>>>> dimuthu >>>>>> >>>>>> >>>>>> On Tue, Nov 11, 2014 at 12:16 PM, Pulasthi Supun <pulas...@wso2.com> >>>>>> wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> >>>>>>> From what i understand the AF and SM are in different domains that >>>>>>> is why distributed caching will not be able to handle this scenario >>>>>>> right?. >>>>>>> global cluster cache invalidation has been done with the use of a pub >>>>>>> sub >>>>>>> mechanism ( discussed in archi under "Global cluster cache invalidation >>>>>>> code review Notes" ) but this will only be available in the next release >>>>>>> AFAIK. >>>>>>> >>>>>>> Regards, >>>>>>> Pulasthi >>>>>>> >>>>>>> On Tue, Nov 11, 2014 at 10:00 AM, Amalka Subasinghe <ama...@wso2.com >>>>>>> > wrote: >>>>>>> >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> The scenario is, we have mounted SM's registry to the App Factory >>>>>>>> registry to remove the remote call for read the resources. but still >>>>>>>> the >>>>>>>> write calls happens via SM. see the image below. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> The problem is, once we do a write call to the SM's registry, App >>>>>>>> Factory registry cache won't get updated, so old information will be >>>>>>>> shown >>>>>>>> in App Factory pages. >>>>>>>> Is there a way to remove an entry from the App Factory registry >>>>>>>> cache when we do a write call to the SM's registry? then when we do a >>>>>>>> read >>>>>>>> call, it will load the cache again and show the updated information. >>>>>>>> >>>>>>>> Thanks >>>>>>>> Amalka >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Architecture mailing list >>>>>>>> Architecture@wso2.org >>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> Pulasthi Supun >>>>>>> Software Engineer; WSO2 Inc.; http://wso2.com, >>>>>>> Email: pulas...@wso2.com >>>>>>> Mobile: +94 (71) 9258281 >>>>>>> Blog : http://pulasthisupun.blogspot.com/ >>>>>>> Git hub profile: https://github.com/pulasthi >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Dimuthu Leelarathne >>>>>> Architect & Product Lead of App Factory >>>>>> >>>>>> WSO2, Inc. (http://wso2.com) >>>>>> email: dimut...@wso2.com >>>>>> Mobile : 0773661935 >>>>>> >>>>>> Lean . Enterprise . Middleware >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Pulasthi Supun >>>>> Software Engineer; WSO2 Inc.; http://wso2.com, >>>>> Email: pulas...@wso2.com >>>>> Mobile: +94 (71) 9258281 >>>>> Blog : http://pulasthisupun.blogspot.com/ >>>>> Git hub profile: https://github.com/pulasthi >>>>> >>>> >>>> >>>> >>>> -- >>>> Dimuthu Leelarathne >>>> Architect & Product Lead of App Factory >>>> >>>> WSO2, Inc. (http://wso2.com) >>>> email: dimut...@wso2.com >>>> Mobile : 0773661935 >>>> >>>> Lean . Enterprise . Middleware >>>> >>> >>> >>> >>> -- >>> -- >>> Pulasthi Supun >>> Software Engineer; WSO2 Inc.; http://wso2.com, >>> Email: pulas...@wso2.com >>> Mobile: +94 (71) 9258281 >>> Blog : http://pulasthisupun.blogspot.com/ >>> Git hub profile: https://github.com/pulasthi >>> >> >> >> >> -- >> Dimuthu Leelarathne >> Architect & Product Lead of App Factory >> >> WSO2, Inc. (http://wso2.com) >> email: dimut...@wso2.com >> Mobile : 0773661935 >> >> Lean . Enterprise . Middleware >> > > > _______________________________________________ > Architecture mailing list > Architecture@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Manjula Rathnayaka Software Engineer WSO2, Inc. Mobile:+94 77 743 1987
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture