code: public void cache(String key, Object obj, int expiration) {
          H.Session session = this.session;
          if (null != session) {
              session.cache(key, obj, expiration);
          } else {
              app().cache().put(key, obj, expiration);
          }
      }
docs: Add an object into cache by key with expiration time specified
  
  @param key
  the key to index the object within the cache
  @param obj
  the object to be cached
  @param expiration
  the seconds after which the object will be evicted from the cache