Google Appengine关闭和启动脚本

问题描述 投票:0回答:1

任何Java代码建议,在部署前后都要在google app引擎中手动添加启动和关闭脚本以持久化本地缓存

google-cloud-platform memcached
1个回答
0
投票

您可以使用“ Shutdown Hook”来了解您的实例何时会宕机,但这是不可靠的[ Official documentation中指定的。

您可以将memcache用于App Engine,这样您就不必关心实例,因为即使实例发生故障,缓存也将持续存在。

您可以将memcache用作共享缓存而不是本地缓存。 Using Memcache

注意,memcache用于第一代Runtimes,否则对于第二代运行时,您可以使用Memorystore

[Memorystore有一个教程How to Connect Google Cloud Memorystore with App Engine Standard

© www.soinside.com 2019 - 2024. All rights reserved.