A method of processing queries in a database system, the database system comprising an original data source storing a plurality of pieces of original data and a cache source storing a plurality of pieces of cached data, each piece of cached data being associated with an accuracy value, the method comprising: randomly selecting queries from among a plurality of queries handled by the database system, at the time the respective query is received from a client; for each of the queries randomly selected, retrieving a first piece of the cached data matching the randomly selected query from the cache source, and retrieving a first piece of the original data matching the randomly selected query from the original data source; for queries not being randomly selected, retrieving a second piece of the cached data matching the query from the cache source; evaluating the accuracy value of the second piece of the cached data; if the accuracy value is below a given threshold, retrieving a second piece of the original data matching the query from the original data source, and updating the second piece of the cached data by the second piece of the original data; and adapting a probabilistic model based on the first piece of the cached data and the first piece of the original data using a machine learning algorithm, wherein the accuracy value is derived from the probabilistic model and indicates a probability that a piece of the cached data coincides with a corresponding piece of the original data. randomly selecting queries from among a plurality of queries handled by the database system, at the time the respective query is received from a client; for each of the queries randomly selected, retrieving a first piece of the cached data matching the randomly selected query from the cache source, and retrieving a first piece of the original data matching the randomly selected query from the original data source; retrieving a first piece of the cached data matching the randomly selected query from the cache source, and retrieving a first piece of the original data matching the randomly selected query from the original data source; for queries not being randomly selected, retrieving a second piece of the cached data matching the query from the cache source; evaluating the accuracy value of the second piece of the cached data; if the accuracy value is below a given threshold, retrieving a second piece of the original data matching the query from the original data source, and updating the second piece of the cached data by the second piece of the original data; and retrieving a second piece of the cached data matching the query from the cache source; evaluating the accuracy value of the second piece of the cached data; if the accuracy value is below a given threshold, retrieving a second piece of the original data matching the query from the original data source, and updating the second piece of the cached data by the second piece of the original data; and retrieving a second piece of the original data matching the query from the original data source, and updating the second piece of the cached data by the second piece of the original data; and adapting a probabilistic model based on the first piece of the cached data and the first piece of the original data using a machine learning algorithm, wherein the accuracy value is derived from the probabilistic model and indicates a probability that a piece of the cached data coincides with a corresponding piece of the original data. <EOS>