| Index: filter/dscache/ds_txn.go
|
| diff --git a/filter/dscache/ds_txn.go b/filter/dscache/ds_txn.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..663fc4fe345579e6768689447eecedcf261f48bb
|
| --- /dev/null
|
| +++ b/filter/dscache/ds_txn.go
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package dscache
|
| +
|
| +import (
|
| + ds "github.com/luci/gae/service/datastore"
|
| + "github.com/luci/gae/service/memcache"
|
| +)
|
| +
|
| +type dsTxnCache struct {
|
| + ds.RawInterface
|
| +
|
| + state *dsTxnState
|
| + mc memcache.Interface
|
| +}
|
| +
|
| +var _ ds.RawInterface = (*dsTxnCache)(nil)
|
| +
|
| +func (d *dsTxnCache) DeleteMulti(keys []ds.Key, cb ds.DeleteMultiCB) error {
|
| + d.state.Add(d.mc, keys)
|
| + return d.RawInterface.DeleteMulti(keys, cb)
|
| +}
|
| +
|
| +func (d *dsTxnCache) PutMulti(keys []ds.Key, metas []ds.PropertyMap, cb ds.PutMultiCB) error {
|
| + d.state.Add(d.mc, keys)
|
| + return d.RawInterface.PutMulti(keys, metas, cb)
|
| +}
|
|
|