You can translate the question and the replies:

Cache not working

Hi, I am following the tutorials for denodo platform, it all went well until the cache settings from here: https://community.denodo.com/tutorials/browse/basics/5cache2view I have configured cache settings in server configuration by choosing "embedded derby server" and also enabled cache mode to "partial" for the client_with_bills view. I checked my settings multiple times and pretty sure they are the same as the tutorials. When I query the data for the first time it successfully retreive the data from data source(MySQL and SOAP), but my second query has nothing different than the first one, data always coming from sources instead of cache. I have done it both from VQL Shell using "select * from client_with_bills TRACE" and from view's excution panel using its default query "SELECT * FROM tutorial.client_with_bills CONTEXT('cache_wait_forload' = 'true') TRACE" , but according to the execution trace result, it keeps getting data from the source, just couldn't trigger any read from cache. Could you help me on this case, please.
user
27-11-2022 09:17:33 -0500
code

1 Answer

Hi, In general, when a query with the **[partial cache](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/cache_module/cache_modes/partial_mode)** is executed, the server checks if the cache contains the data required to answer the query. If it does not have this data, the Server executes queries to data source and the data is retrieved from the source. Further to cache the data in the partial mode, there are **two different modes** namely, * Explicit loads * Match exact queries only If the **[Explicit loads](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/cache_module/cache_modes/partial_mode#explicit-loads)** option is selected, then the cache has to be loaded explicitly using the parameter **'cache_preload'='true'**. Whereas, when **[Match Exact Queries Only](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/cachemodule/cachemodes/partialmode#match-exact-queries-only)** is selected, the cache stores the result of each query. It retrieves the data from the cache when the same query is executed and the entries of this query in cache have not expired. Hence, I followed the below steps to retrieve the data from the cache when partial cache is enabled for a view, * Selected the view “**client_with_bills**” and navigate to **Options>Cache**. * Selected the required cache mode for my scenario under the Partial Cache mode and save the changes. For example, if I want to make use of the **explicit loads** mode, then I will enable the explicit loads option and make use of the store results in cache in the **Execute** tab. * After successful execution, I was able to check in the Execution Trace that the data is retrieved from the cache. You could refer to this Expert Trial about the [Cache](https://community.denodo.com/expert-trails/view/document/Expert%20Trail:%20Cache) for more information. Hope this helps!
Denodo Team
28-11-2022 06:22:17 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here