Skip to content

Commit

Permalink
Move cache to redis
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Dec 29, 2022
1 parent ab27192 commit e07668a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
12 changes: 8 additions & 4 deletions .k8s/manifest-dallas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ plugin: rate-limiting
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: proxy-cache-alquran-api
name: proxy-cache-redis-alquran-api
namespace: alquran-cloud
config:
response_code:
Expand All @@ -105,11 +105,15 @@ config:
- 301
request_method:
- GET
- HEAD
content_type:
- application/json
cache_ttl: 86400
strategy: memory
plugin: proxy-cache
cache_control: true
storage_ttl: 259200
redis_port: 6379
redis_host: redis-cache-master
plugin: proxy-cache-redis
# Deployment
---
apiVersion: apps/v1
Expand Down Expand Up @@ -205,7 +209,7 @@ metadata:
name: alquran-cloud-api
namespace: alquran-cloud
annotations:
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-alquran-api
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-redis-alquran-api
spec:
ports:
- port: 80
Expand Down
12 changes: 8 additions & 4 deletions .k8s/manifest-london.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ plugin: rate-limiting
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: proxy-cache-alquran-api
name: proxy-cache-redis-alquran-api
namespace: alquran-cloud
config:
response_code:
Expand All @@ -89,11 +89,15 @@ config:
- 301
request_method:
- GET
- HEAD
content_type:
- application/json
cache_ttl: 86400
strategy: memory
plugin: proxy-cache
cache_control: true
storage_ttl: 259200
redis_port: 6379
redis_host: redis-cache-master
plugin: proxy-cache-redis
---
# Service
apiVersion: v1
Expand All @@ -102,7 +106,7 @@ metadata:
name: alquran-cloud-api
namespace: alquran-cloud
annotations:
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-alquran-api
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-redis-alquran-api
spec:
ports:
- port: 80
Expand Down
12 changes: 8 additions & 4 deletions .k8s/manifest-singapore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ plugin: rate-limiting
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: proxy-cache-alquran-api
name: proxy-cache-redis-alquran-api
namespace: alquran-cloud
config:
response_code:
Expand All @@ -77,11 +77,15 @@ config:
- 301
request_method:
- GET
- HEAD
content_type:
- application/json
cache_ttl: 86400
strategy: memory
plugin: proxy-cache
cache_control: true
storage_ttl: 259200
redis_port: 6379
redis_host: redis-cache-master
plugin: proxy-cache-redis
---
# Service
apiVersion: v1
Expand All @@ -90,7 +94,7 @@ metadata:
name: alquran-cloud-api
namespace: alquran-cloud
annotations:
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-alquran-api
konghq.com/plugins: rate-limiting-alquran-api, proxy-cache-redis-alquran-api
spec:
ports:
- port: 80
Expand Down

0 comments on commit e07668a

Please sign in to comment.