How to test django caching?
The reason you use caches is to improve performance.  Test the performance by running a load test against your server.  If the server's performance matches your needs, then you are all set!
Is there a way to be sure that a page is coming from cache on a production server and on the development server as well?
The solution shouldn't involve caching middleware because not every project uses them. Though the solution itself might be a middleware.
Just checking if the data is stale is not a very safe testing method IMO.