Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with adding memcached in dev and test #4619

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ services:
orangelight_redis:
type: redis:6.0.16
portforward: true
orangelight_memcached:
type: memcached
portforward: true
proxy:
orangelight_test_solr:
- orangelight.test.solr.lndo.site:8983
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ gem 'capistrano-passenger'
# support for non-marc citations (e.g. SCSB records)
gem 'citeproc-ruby'
gem 'csl-styles'
gem 'dalli'
# Authentication and authorization
gem 'devise'
gem 'devise-guests'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ GEM
csl-styles (2.0.1)
csl (~> 2.0)
csv (3.3.0)
dalli (3.2.8)
datadog (2.7.0)
datadog-ruby_core_source (~> 3.3)
libdatadog (~> 14.1.0.1.0)
Expand Down Expand Up @@ -771,6 +772,7 @@ DEPENDENCIES
citeproc-ruby
coveralls_reborn
csl-styles
dalli
datadog
devise
devise-guests
Expand Down
1 change: 1 addition & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false

config.cache_store = :mem_cache_store, "#{ENV['lando_orangelight_memcached_conn_host']}:#{ENV['lando_orangelight_memcached_conn_port']}" # Will fallback to $MEMCACHE_SERVERS, then 127.0.0.1:11211
config.assets.quiet = true

# Do not eager load code on boot.
Expand Down
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# use null_store in CI, mem_cache_store locally
config.cache_store = ENV['CI'].present? ? :memory_store : :mem_cache_store, "#{ENV['lando_orangelight_memcached_conn_host']}:#{ENV['lando_orangelight_memcached_conn_port']}"

# Eager loading loads your whole application. When running a single test locally,
# this probably isn't necessary. It's a good idea to do in a continuous integration
Expand Down
Loading