@@ -72,7 +72,6 @@ def persistent(name, **opts, &block)
7272 end
7373 end
7474
75- ##
7675 # Cache an ActiveRecord collection. Supports only a basic collection of one type of object. Column selections or
7776 # joins etc. will NOT be respected when the collection is read back out.
7877 # @param name [String] cache key name
@@ -87,12 +86,12 @@ def write_collection(name, value, **opts)
8786 @underlying . write ( namespaced , data , **opts )
8887 end
8988
90- ##
9189 # Read an ActiveRecord collection from cache. Returns a basic collection of the records that were cached, with
9290 # no selects or joins applied.
9391 # @param name [String] cache key name
9492 # @param opts [Hash] options hash - any unlisted options will be passed to the underlying cache
9593 # @options opts [Boolean] :include_community whether to include the community ID in the cache key
94+ # @return [ActiveRecord::Relation, nil]
9695 def read_collection ( name , **opts )
9796 namespaced = construct_ns_key ( name , include_community : include_community ( opts ) )
9897 data = @underlying . read ( namespaced , **opts )
@@ -108,7 +107,6 @@ def read_collection(name, **opts)
108107 end
109108 end
110109
111- ##
112110 # Fetch an ActiveRecord collection from cache if it is present, otherwise cache the value returned by +block+.
113111 # @param name [String] cache key name
114112 # @param opts [Hash] options hash - any unlisted options will be passed to the underlying cache
0 commit comments