mongoid_store 0.1.0 → 0.1.1
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.
- 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)
|