I am using MySQL as my database, and diesel to retrieve the data. The data get updated every second from multiple end-points. The problem is while using diesel, to retrieve the data, the results I get are outdated (probably due to the cache on diesel side). MySQL runs with SET GLOBAL query_cache_size = 0, so there is no active cache on the DB server-side.
Here is the part of my code to retrieve the data:
pub struct Weather {
pub id: u32,
pub temperature: f32,
pub datetime: NaiveDateTime,
}
pub fn {
let timewindow = ... // A timewindow I set
let results = weather.filter(datetime.ge(timewindow)).load::<Weather>(&db).unwrap();
println("{:?}", results)
}
Do you know how I can deactivate the cache on diesel?