Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: pkg/appengine/lib/api/memcache.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/appengine/lib/api/logging.dart ('k') | pkg/appengine/lib/api/modules.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/appengine/lib/api/memcache.dart
diff --git a/pkg/appengine/lib/api/memcache.dart b/pkg/appengine/lib/api/memcache.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e3a0f9d0d16b6f6b1730cc2ad80742455f82ca94
--- /dev/null
+++ b/pkg/appengine/lib/api/memcache.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library appengine.api.memcache;
+
+import 'package:gcloud/service_scope.dart' as ss;
+import 'package:memcache/memcache.dart';
+
+/**
+ * Register a new [Memcache] object.
+ *
+ * Calling this outside of a service scope or calling it more than once inside
+ * the same service scope will result in an error.
+ *
+ * See the `package:gcloud/service_scope.dart` library for more information.
+ */
+void registerMemcacheService(Memcache service) {
+ ss.register(#_appengine.memcache, service);
+}
+
+/**
+ * The memcache service.
+ *
+ * Request handlers will be run inside a service scope which contains the
+ * memcache service.
+ */
+Memcache get memcacheService => ss.lookup(#_appengine.memcache);
« no previous file with comments | « pkg/appengine/lib/api/logging.dart ('k') | pkg/appengine/lib/api/modules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698