Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
NDB is an experimental, innovative, and rapidly changing new feature for App Engine. Unfortunately, being on the bleeding edge means that we may make backwards-incompatible changes to NDB. We will inform the community when this feature is no longer experimental.
An application can use a Context to control its caching policy.
Context
also offers convenient asynchronous APIs for
Memcache and URL Fetch integrated into NDB's asynchronous facilities;
in particular, the Memcache API supports auto-batching.
Returns a Future
. To wait for the flushing to finish,
call this object's wait()
method.
bool
indicating whether the entity
with this key should be cached in the in-context cache.
May be None
(meaning use
default_cache_policy
).
bool
indicating if it should use the Datastore.
May be None
(meaning use
default_datastore_policy
).
Arguments
bool
indicating whether the entity
with this key should be cached in the in-context cache.
May be None
.
Arguments
Key
instance argument and
returns the desired memcache timeout in seconds (or returns
zero to use the default timeout).
May be None
.
bool
indicating if it should be cached.
May be None
(meaning use
default_memcache_policy
).
None
, which uses
default_memcache_timeout_policy
.
add()
.Client
cas()
(compare-and-swap).
decr()
.
delete()
.
get()
.
Returns a Future
whose return value is the value
retrieved from memcache or None
.
gets()
.
incr()
.
replace()
.
set()
.Arguments
bool
indicating whether the entity
with this key should be cached in the in-context cache.
May be None
.
Arguments
bool
indicating whether the entity
with this key should be stored in the persistent Datastore.
May be None
.
fetch().
_use_cache
class variable on the entity's model class; if there is one, return it.
Otherwise, return None
.
_use_datastore
class variable on the entity's model class; if there is one, return it.
Otherwise, return None
.
_use_memcache
class variable on the entity's model class; if there is one, return it.
Otherwise, return None
.
_memcache_timeout
class variable on the entity's model class; if there is one, return it.
Otherwise, return None
.