How can I cache queries in sqlalchemy just like I do it in mysql by using SQL_CACHE keyword? I want to cache sqlalchemy,i have discovered that using keyword SQL_CACHE in mysql can be helpful in caching queries on demand.
But how do i do it in sqlalchemy ?
Is it possible ?
You need use a prefix_with.
For example, this:

query = session.query(User.name).prefix_with('SQL_CACHE')


would render:

SELECT SQL_CACHE users.name AS users_name FROM users