Skip to content

Commit 1f5fe5f

Browse files
committed
minor cleanup of NamespacedEnvCache's YARD
1 parent 04dc1d3 commit 1f5fe5f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/namespaced_env_cache.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)