Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
github.com/qedus/nds/v2
Package github.com/qedus/nds
is a Google Cloud Datastore API for Go that uses a cache backend to cache all datastore requests. Memcache is only supported on Google AppEngine Standard, but the package can be used for any other implemented cache backend on any platform (local, Google Compute, AWS, etc.). This package guarantees strong cache consistency when using nds.Client.Get*
and nds.Client.Put*
, meaning you will never get data from a stale cache.
Exposed parts of this API are the same as the official one distributed by Google (code.google.com/go/datastore
). However, underneath github.com/qedus/nds
uses a caching stategy similar to the GAE Python NDB API. In fact the caching strategy used here even fixes one or two of the Python NDB caching consistency bugs.
You can find the API documentation at http://godoc.org/github.com/qedus/nds.
One other benefit is that the standard datastore.Client.GetMulti
, datastore.Client.PutMulti
and datastore.Client.DeleteMulti
functions only allow you to work with a maximum of 1000, 500 and 500 entities per call respectively. The nds.Client.GetMulti
, nds.Client.PutMulti
and nds.Client.DeleteMulti
functions in this package allow you to work with as many entities as you need (within timeout limits) by concurrently calling the appropriate datastore function until your request is fulfilled.
You can use this package in exactly the same way you would use code.google.com/go/datastore.Client
for methods provided by nds.Client
. However, it is important that you use a nds.Client
entirely within your code. Do not mix use of those functions with the code.google.com/go/datastore.Client
equivalents as you will be liable to get stale datastore entities from github.com/qedus/nds
.
Ultimately all you need to do is:
nds.NewClient
instead of datastore.NewClient
, providing a cache configuration to the new client creation function.datastore.Transaction
-> nds.Transaction
(*datastore.Query).Transaction
for queries within transactions, switch to the (*nds.Transaction).Query
helper.FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.