mongoid_store 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.rdoc +4 -0
- data/lib/active_support/cache/mongoid_store.rb +1 -1
- data/lib/mongoid_store/version.rb +1 -1
- metadata +1 -1
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
ActiveSupport Mongoid 3 Cache store, loosly based on Bin by John Nunemaker
|
4
4
|
|
5
|
+
== Complex data types
|
6
|
+
|
7
|
+
MongoidStore tries to store the values you put in directly into MongoDB using Moped. When experiencing trouble you may have to do your own serialization and deserialization.
|
8
|
+
|
5
9
|
== Supports
|
6
10
|
|
7
11
|
* Mongoid 3+
|
@@ -29,7 +29,7 @@ module ActiveSupport
|
|
29
29
|
protected
|
30
30
|
|
31
31
|
def write_entry(key, entry, options)
|
32
|
-
collection.find(_id: key).upsert(_id: key, value: entry.
|
32
|
+
collection.find(_id: key).upsert(_id: key, value: entry.value, expires_at: entry.expires_at.to_i, created_at: Time.now.utc.to_i)
|
33
33
|
end
|
34
34
|
|
35
35
|
def read_entry(key, options = nil)
|