I am trying to figure out the best alternative to use some sort of memory caching for a Django application with a postgress database deployed on DigitalOcean App Platform.
I cannot see any documentation of how to include memcached or any other in-memory management tool as part of the App Platform deployment.
Any Ideas will be appreciated
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Memcachedis an in-memory data storage system. You can run
Memcachedas an internal service in the App Platform. It is an internal service therefore there will be no HTTP route or PORT set.
A sample code for a
Memcachedservice can be seen like below
Other services can access the Memcached service using <servicename>:<internal_ports> like below for the above sample Memcached service.
After successful deployment, to connect other services with Memcached service, run the below command in the service console from whom you want to connect Memcached with.
Note: App Platform instances are ephemeral and can be redeployed at any time which would cause the contents of the Memcached server to be lost.
Memcachedfor in-memory data storage, we also provide
Redisas a managed database in the Digital Ocean. You can view the below links for information related to how to create
Redis Databaseand how to manage databases in the App Platfrom.
Redis Database in Digital Ocean How to manage Database in App Platform link