Skip to content

Commit

Permalink
Added redis cache layer for staging.datacommons.org (#4383)
Browse files Browse the repository at this point in the history
Note: after merging, update oncall docs with a step to clear redis after
deploying to staging
  • Loading branch information
dwnoble authored Jun 24, 2024
1 parent 7accd94 commit 717de43
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
9 changes: 9 additions & 0 deletions deploy/helm_charts/envs/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ website:
flaskEnv: staging
replicas: 6
enableModel: true
redis:
enabled: true
configFile: |
{
"us-central1": {
"host": "10.127.249.59",
"port": "6379"
}
}
ingress:
enabled: false
Expand Down
1 change: 0 additions & 1 deletion server/app_env/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ class Config(_base.Config):
GA_ACCOUNT = 'G-HV2XYYS1JD'
USE_LLM = True
LOG_QUERY = True
USE_MEMCACHE = False
17 changes: 17 additions & 0 deletions tools/clearcache/clear_staging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

SCRIPT_PATH=`dirname $0`
$SCRIPT_PATH/run.sh datcom-website-staging website-us-central1 us-central1

0 comments on commit 717de43

Please sign in to comment.