You will design the object as a singleton ( this design pattern will limit this object to a single instance ) and have the appropriate retrieve and store methods to manipulate the cache. 您将把对象设计为一个单子实例(singleton)(这个设计模式将把这个对象限制在一个单个实例中)并使用合适的检索和存储方法对高速缓存进行操作。