Skip to content

Commit 7563be4

Browse files
Document AS::Cache::MemCacheStore#write options [ci-skip]
1 parent 7e884e2 commit 7563be4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

activesupport/lib/active_support/cache/mem_cache_store.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ def initialize(*addresses)
130130
end
131131
end
132132

133+
##
134+
# :method: write
135+
# :call-seq: write(name, value, options = nil)
136+
#
137+
# Behaves the same as ActiveSupport::Cache::Store#write, but supports
138+
# additional options specific to memcached.
139+
#
140+
# ==== Additional Options
141+
#
142+
# * <tt>raw: true</tt> - Sends the value directly to the server as raw
143+
# bytes. The value must be a string or number. You can use memcached
144+
# direct operations like +increment+ and +decrement+ only on raw values.
145+
#
146+
# * <tt>unless_exist: true</tt> - Prevents overwriting an existing cache
147+
# entry.
148+
133149
# Increment a cached integer value using the memcached incr atomic operator.
134150
# Returns the updated value.
135151
#

0 commit comments

Comments
 (0)