Question

My coherence configuration is super simple:

<cache-config>
    <caching-scheme-mapping>
        <cache-mapping>
            <cache-name>*</cache-name>
            <scheme-name>distributed</scheme-name>
        </cache-mapping>

    </caching-scheme-mapping>

    <caching-schemes>
        <distributed-scheme>
            <scheme-name>distributed</scheme-name>
        </distributed-scheme>
    </caching-schemes>

</cache-config>

and expected behaviour is that every read will go to partition, however from perf tests I could see that reads is done locally - no network calls occur.

I tried to follow official docs but wasn't able to find how to make cache fully distributed. Any advise will be appreciated!

Était-ce utile?

La solution

you can set expiration time to 1ms, it will do the work. the attribute called <expiry-delay>

for example:

</caching-schemes>
 <distributed-scheme>
  <scheme-name>cache-distributed</scheme-name>
  <service-name>Foo</service-name>
    <lease-granularity>member</lease-granularity>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
      <internal-cache-scheme>
        <local-scheme>
          <expiry-delay>1ms</expiry-delay>
        </local-scheme>
      </internal-cache-scheme>
    </read-write-backing-map-scheme>
  </backing-map-scheme>
 </distributed-scheme>
</caching-schemes>

it's workaround we used once, maybe it'll suit you.

Autres conseils

run with local storage disabled. set the value to false in your cache scheme declaration or pass it like vm prameter. false

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top