-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
31 lines (24 loc) · 1.29 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
Package nds is a Go datastore API for Google App Engine that caches datastore
calls in memcache in a strongly consistent manner. This often has the effect
of making your app faster as memcache access is often 10x faster than datastore
access. It can also make your app cheaper to run as memcache calls are free.
This package goes to great lengths to ensure that stale datastore values are
never returned to clients, i.e. the caching layer is strongly consistent.
It does this by using a similar strategy to Python's ndb. However, this
package fixes a couple of subtle edge case bugs that are found in ndb. See
http://goo.gl/3ByVlA for one such bug.
There are currently no known consistency issues with the caching strategy
employed by this package.
Use
Package nds is used exactly the same way as appeninge/datastore. Ensure that
you change all your datastore Get, Put, Delete and RunInTransaction function
calls to use nds when converting your own code.
If you mix appengine/datastore and nds API calls then you are liable to get
stale cache.
Converting Legacy Code
To convert legacy code you will need to find and replace all invocations of
datastore.Get, datastore.Put, datastore.Delete, datastore.RunInTransaction with
nds.Get, nds.Put, nds.Delete and nds.RunInTransaction respectively.
*/
package nds