Pass SQL_NO_CACHE in your SELECT
query, or turn it off on a session level:
cursor.execute("SET SESSION query_cache_type = OFF")
See also:
- How to turn off MySQL query cache while using SQLAlchemy?
- MySQL - force not to use cache for testing speed of query
Hope that helps.