Your code seems to be correct. It works for me in a simplified form:
https://gist.github.com/ptupitsyn/a64c899b32b73ab55cb706cd4a09e6e9

1. Can you try the program above - does it work for you?
2. Can you confirm that the Oracle query returns a non-empty result set?


On Mon, Nov 23, 2020 at 3:00 AM ABDumalagan <ad1...@scarletmail.rutgers.edu>
wrote:

> I see - am I dealing with 1.) in my case?
>
> When I hover over the method LoadCache(Action<int, Associate>, params
> object[] args) in Visual Studio, it says that *"...This method is called
> whenever
> Apache.Ignite.Core.Cache.ICache<TK,TV>.LocalLoadCache(Apache.Ignite.Core.Cache.ICacheEntryFilter<TK,TV>,
> params object[]) method is invoked which is usually to preload the cache
> from persistent storage"*.
>
> From the .NET docs
> <https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.ICache-2.html#Apache_Ignite_Core_Cache_ICache_2_LocalLoadCache_Apache_Ignite_Core_Cache_ICacheEntryFilter__0__1__System_Object___>,
> it says that for LocalLoadCache(ICacheEntryFilter<TK, TV>, Object[]), the
> loaded values will then be given to the optionally passed in predicate,
> and, if the predicate returns true, will be stored in cache. If predicate
> is null, then all loaded values will be stored in cache.
>
> In my case, I call cache.LocalLoadCache(null) in Program.cs
> <http://apache-ignite-users.70518.x6.nabble.com/file/t3023/Program.cs>,
> where it then calls on LoadCache(Action<int, Associate> act, params
> object[] args) in OracleStore.cs
> <http://apache-ignite-users.70518.x6.nabble.com/file/t3023/OracleStore.cs>
> and the Associate IDs are being printed to console.
>
> However, when I try to print the cache size in console, it returns 0 -
> does this mean that the values are not being stored in cache?
>
> Do I need to do something else to make sure the values are loaded into
> cache? I thought that LocalLoadCache would just put all the values queried
> from the underlying storage into cache.
>
> ------------------------------
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>
>

Reply via email to