3 Replies Latest reply on Jan 22, 2013 2:14 AM by m m

    Creating custom CacheLoader

    Mikolaj Gierulski Newbie

      I need to create a CacheLoader which reads from our relational database structure. I cannot use the provided cache loader implementations, as our structure is specific, and a lot of data manipulation (including reading from multiple tables) will happen there.

      I overriden AbstractCacheLoader and AbstractCacheLoaderConfig classes (the latter to be able to get db connection). But it seems, that my cacheloader specific configuration which I provide in <properties> section is not applied to my cacheloader.

      I found that LegacyConfigurationAdaptor applies these properties only if the CacheLoaderConfig is instanceof AbstractCacheStoreConfig - this seems strange, as I don't want to implement CacheStore, only CacheLoader interface. Is there any way to apply these properties to my cacheloader?


      Another question is if there is any simpler way to provide cacheloaders (and cachestores)? I mean injecting some spring beans, or something in this fashion?


      Best regards,