Velocity CTP: can we 'search' for objects?

Posted by Stato Machino on Stack Overflow See other posts from Stack Overflow or by Stato Machino
Published on 2010-06-04T22:42:17Z Indexed on 2010/06/05 22:52 UTC
Read the original article Hit count: 171

Filed under:
|

It appears that 'tags' allow us to associate a 'search term' with the objects placed into the Velocity cache space.

However, these can only be queried within a 'region'.

Further, regions somehow limit the locality of objects in the cache to a single server (or maybe something kinda like that).

So this appears to make it hard to perform any operation for which the unique Id of the cached item is not persisted or continuously available to the application that stores and retrieves objects to and from the cache.

In any case, I can't see an easy way to 'cleanse' the cache of objects or to find objects across the entire cache that may share some prefix, postfix or infix values in the cache key so that i can clear out the cache of object repeatedly created in unit tests, for example.

And I am unsure about the consequences of regions being associated with single server cache locations.

So I would appreciate any help with the following questions:

  1. What is the difference between a 'distributed cache' (called a 'partitioned' cache??) when using regions, and a 'local cache'?

1.a. In particular, are the region-oriented values in a distributed cache visible through a cache factory that is configured to 'see' the entire cache space?

  1. Are the operations of creating and removing 'regions' efficient enough that it would be reasonable to create a region and a group of tags for each bundle of objects that need to be cached?

2.a. Or does this just push the problem of scoping the 'search for objects' up the chain because the ability of the DataCache object to query down through regions and tags as limited as querying for the cache keys of objects themselves.

Thanks,

Stato

© Stack Overflow or respective owner

Related posts about velocity

Related posts about appfabric