[Mondrian] mondrian member cache & RolapCubeHierarchy

Marc Berkowitz mberkowitz at users.sourceforge.net
Mon Feb 4 23:27:05 EST 2008


I'm working on extending the interface modrian.olap.CacheControl
to provide some control over cached dimension membrers. I'm a bit
puzzled by the way the cache is used by RolapCubeHierachy.

As I understand it, there isn't a single member cache object. Instead each
Hierarchy has its own cache; that is, each RolapHierarchy has a
MemberReader, which can be a SmartMemberReader which has a
MemberCacheHelper. OK.

But for a shared dimension, each hierarchy is a RolapCubeHierarchy, which
"wraps" a RolapHierarchy. Actually RolapCubeHierarchy both extends and
delegates to a RolapHierarchy, plus it contains a MemberCacheHelper of its
own. That makes 3 independent caches: this.cacheHelper,
delegate.cacheHelper, and rolapCubeCacheHelper.

I'd have thougth a shared dimension was a single entity appearing in
several contexts,
and likewise all its components, so why need separate Member objects?
If someone calls the new CacheControl to edit a member, say [Store],
don't they want to affect
all Cubes that use [Store]?

Even if it's correct to have a separate cache, there should be 2 not 3.
It would be correct for RolapCubeHierarchy to construct its own
MemberCacheHelper,
but it should put it in the inherited field, this.cacheHelper, not in a
new field, rolapCubeCacheHelper.

Does any of this affect me implementing member cache control: ie do I
have to make duplicate
changes to 2 parallel caches?




More information about the Mondrian mailing list