By digging into django's source, you could find the template loaders for current server instance are stored at django.template.loader.template_source_loaders
.
When you're using cached loader, there would be only one loader out there. So you can get it and calls its reset function to reset template cache.
Here are some code snippets, I haven't test it myself.
from django.template.loader import template_source_loaders
loader = template_source_loaders[0]
loader.reset()
If you check django.template.loaders.cached
, you can see that django simply use one variable template_cache
to hold the template name to template path cache. It doesn't use memcached. So it should be reset when django restart.