Cache Key for object data
435061
def _objectdata_cache_key(func, obj):
    
    uid = api.get_uid(obj)
    modified = api.get_modification_date(obj).millis()
    review_state = api.get_review_status(obj)
    return "{}-{}-{}".format(uid, review_state, modified)
548708
def bind_keys(self, objects):
        """"""
        for object in objects:
            if object.keys != None:
                for key in object.keys:
                    if key != None:
                        self.bind_key_name(key, object.name)
1052023
def query_cache_by_object(self, zenpy_object):
        
        object_type = get_object_type(zenpy_object)
        cache_key = self._cache_key_attribute(object_type)
        return self.get(object_type, getattr(zenpy_object, cache_key))
910612
function store(key, value){
  var length = arguments.length;
  if (0 == length) return all();
  if (2 <= length) return set(key, value);
  if (1 != length) return;
  if (null == key) return storage.clear();
  if ('string' == typeof key) return get(key);
  if ('object' == typeof key) return each(key, set);
}
1143905
public void cache(Identity oid, Object obj)
    {
        try
        {
            jcsCache.put(oid.toString(), obj);
        }
        catch (CacheException e)
        {
            throw new RuntimeCacheException(e);
        }
    }
501503
def get_object_cache_keys(instance):
    
    if not instance.pk or instance._state.adding:
        return []

    keys = []
    for language in _get_available_languages(instance):
        keys.append(get_urlfield_cache_key(instance.__class__, instance.pk, language))

    return keys
1139503
@Override
	public void cache(final Object key, final Object object) {
		this.logger.debug("@cache ");

		if (object == null) {
			if (!isAllowNullable()) {
				return;
			}
			this.logger.debug("logging key :", key, " with null");
			getCachableMap(JKAbstractCacheManager.NULLABLE_MAP_CLASS).put(key, null);
		} else {
			cache(key, object, object.getClass());
		}
	}
287368
def _get_dataobject(self, name, multivalued):
        """"""
        logger.debug("Querying server for uncached data object %s", name)
        # This will retrieve the value and inject it into the cache
        self.update_view_data(properties=[name])
        return self._cache[name][0]
230576
def cache_key(model, pk):
    ""
    app = model._meta.app_label
    name = model._meta.module_name
    return 'api:{0}:{1}:{2}'.format(app, name, pk)
1175450
@Override
    @SuppressWarnings("unchecked")
    public V get(Object key) {
        final Element element = this.cache.get((Serializable) key);
        if (element == null) {
            return null;
        }

        return (V) element.getObjectValue();
    }
543131
def cache(self, obj):
        '''
        
        '''
        # Check cache path exists for current obj
        write_path = os.path.join( self.cache_path, obj.org_id )
        if not os.path.exists( write_path ): 
            mkdir_p( write_path )

        with open(os.path.join( write_path, obj.id ), 'wb') as f:
            pickle.dump( obj, f )
        
        # Add to localstore (keep track of numbers of objects, etc.)
        self.add_to_localstore(obj)   
        self.add_to_names(obj)
730672
public void put(String key, Object object, Envelope envelope) {
		index.put(key, envelope);
		cache.put(key, object);
	}
1007548
public void cache(Object key, T val) {
        cache.put(key, new SoftReference<T>(val));
    }
345584
def store(key, value, options = {})
      @cache.store(key, value, options)
      @adapter.store(key, value, options)
    end
15382
function cacheKey (id) {
    //  get cache id
    var cacheId = stableId({
        columnsId: this.cache.model.columnsId,
        modelViewInstanceIds: this.modelViewInstanceIds,
        recordIds: this.ids,
    })
    // create cache key
    return `${this.cache.model.name}:view:id:collection:${cacheId}`
}
1031455
def cache_keys(keys):
    """"""
    d = known_keys()
    known_names = dict(zip(d.values(), d.keys()))
    for k in keys:
        i = (ord(k),) if len(k) == 1 else known_names[k]
        _key_cache.insert(0, i)
708320
public void cache(String key, Object o, int ttl, Object... args) {
        if (conf().cacheDisabled()) return;
        ICacheService cacheService = _cacheService;
        Serializable value = null == o ? "" : (o instanceof Serializable ? (Serializable) o : o.toString());
        if (args.length > 0) {
            StringBuilder sb = new StringBuilder(key);
            for (Object arg : args) {
                sb.append("-").append(arg);
            }
            key = sb.toString();
        }
        cacheService.put(key, value, ttl);
    }