summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorDante Catalfamo2023-04-28 00:20:41 -0400
committerDante Catalfamo2023-04-28 00:20:53 -0400
commit5859df4f8147d4a53823d45dfb2157118b709088 (patch)
treec828ac7e28f3a288a1a7af9c293c55caf7af92ac /content
parentfe6fe7b014898f684462a09b20f8fa902510e88d (diff)
downloadblog-5859df4f8147d4a53823d45dfb2157118b709088.tar.gz
blog-5859df4f8147d4a53823d45dfb2157118b709088.tar.bz2
blog-5859df4f8147d4a53823d45dfb2157118b709088.zip
rails-test-cache: Add link to api docs
Diffstat (limited to 'content')
-rw-r--r--content/posts/testing-rails-cache/index.org4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/posts/testing-rails-cache/index.org b/content/posts/testing-rails-cache/index.org
index 266a900..397eae4 100644
--- a/content/posts/testing-rails-cache/index.org
+++ b/content/posts/testing-rails-cache/index.org
@@ -8,14 +8,14 @@
#+SUMMARY:
If you're in the default testing environment your rails cache is
-=ActiveSupport::Cache::NullStore= which will always succeed but it
+[[https://api.rubyonrails.org/classes/ActiveSupport/Cache/NullStore.html][=ActiveSupport::Cache::NullStore=]] which will always succeed but it
doesn't actually store or return anything.
There's an almost completely undocumented function called
=with_local_cache= that gets implemented on =NullStore= that lets
you run a block with a =MemoryStore= instead of a =NullStore=. This
happens because it =prepends= the
-=ActiveSupport::Cache::Strategy::LocalCache= class.
+[[https://api.rubyonrails.org/classes/ActiveSupport/Cache/Strategy/LocalCache.html][=ActiveSupport::Cache::Strategy::LocalCache=]] class.
#+begin_src ruby
Rails.cache.class.name