persistent-cache-storage-api 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/persistent-cache/storage_api.rb +17 -19
- data/lib/persistent-cache/version.rb +2 -4
- data/persistent-cache-storage-api.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da729c0628cfa92ce7f59e722869cd81073d25ee
|
4
|
+
data.tar.gz: a09a62b4de02bb002a310f9d70a405091f29beb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c86ef2430fd73cd3f380fb705c8e05a930df6c68222216526e5917843af4acdb51c839a28e9d96cf73a23f38e181268ae0cd714238d769b3978fef5b36b74b
|
7
|
+
data.tar.gz: 7b2413cf4386cb4499fda4560bf7fb5f477103d9a0ffd34cc2e28b29ce986a37f56a025e545882eb08e02af97bc26e720a1d577e5667f962b59688eb2e848a74
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Persistent::
|
1
|
+
# Persistent::Storage::StorageAPI
|
2
2
|
|
3
3
|
This gem encodes the API that Persistent::Cache providers adhere to in order to plug in as a back-end to Persistent::Cache. Please see https://rubygems.org/gems/persistent-cache.
|
4
4
|
|
@@ -26,7 +26,7 @@ Create storage providers by extending this api:
|
|
26
26
|
require 'persistent-cache/storage_api'
|
27
27
|
|
28
28
|
module Persistent
|
29
|
-
class StorageDirectory < Persistent::
|
29
|
+
class StorageDirectory < Persistent::StorageApi::API
|
30
30
|
def initialize(storage_details)
|
31
31
|
# storage_details includes connection strings, etc.
|
32
32
|
end
|
@@ -1,34 +1,32 @@
|
|
1
1
|
require "persistent-cache/version"
|
2
2
|
|
3
3
|
module Persistent
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
public
|
4
|
+
module StorageApi
|
5
|
+
class API
|
6
|
+
public
|
8
7
|
|
9
|
-
|
10
|
-
|
8
|
+
def initialize(storage_details)
|
9
|
+
end
|
11
10
|
|
12
|
-
|
11
|
+
protected
|
13
12
|
|
14
|
-
|
13
|
+
def save_key_value_pair(key, value, timestamp = nil) abstract end
|
15
14
|
|
16
|
-
|
15
|
+
def lookup_key(key) abstract end
|
17
16
|
|
18
|
-
|
17
|
+
def delete_entry(key) abstract end
|
19
18
|
|
20
|
-
|
19
|
+
def size() abstract end
|
21
20
|
|
22
|
-
|
21
|
+
def keys() abstract end
|
23
22
|
|
24
|
-
|
23
|
+
def clear() abstract end
|
25
24
|
|
26
|
-
|
25
|
+
private
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
end
|
27
|
+
def abstract
|
28
|
+
raise NotImplementedError.new("#{self.class.name} is an abstract class.")
|
31
29
|
end
|
32
|
-
end
|
33
|
-
end
|
30
|
+
end
|
31
|
+
end
|
34
32
|
end
|
@@ -5,7 +5,7 @@ require 'persistent-cache/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "persistent-cache-storage-api"
|
8
|
-
spec.version = Persistent::
|
8
|
+
spec.version = Persistent::StorageApi::VERSION
|
9
9
|
spec.authors = ["Ernst Van Graan"]
|
10
10
|
spec.email = ["ernst.van.graan@hetzner.co.za"]
|
11
11
|
|