Skip to content

Commit 745a060

Browse files
committed
Merge branch 'memcached-each-run'
2 parents bddca18 + d69fcee commit 745a060

File tree

5 files changed

+73
-1
lines changed

5 files changed

+73
-1
lines changed

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ services:
5050
- WAIT_FOR=postgres-db:5432
5151
depends_on:
5252
- postgres-db
53+
- memcached
54+
- memcached2
5355
postgres-db:
5456
<<: *postgres-base
5557
image: postgres:${POSTGRES_VERSION}
@@ -78,6 +80,8 @@ services:
7880
- WAIT_FOR=mysql-db:3306
7981
depends_on:
8082
- mysql-db
83+
- memcached
84+
- memcached2
8185
mysql-db: &mysql_base
8286
image: mysql:${MYSQL_VERSION}
8387
entrypoint: ['/entrypoint.sh', '--default-authentication-plugin=mysql_native_password']
@@ -108,6 +112,8 @@ services:
108112
- WAIT_FOR=mariadb-db:3306
109113
depends_on:
110114
- mariadb-db
115+
- memcached
116+
- memcached2
111117
mariadb-db:
112118
image: mariadb:${MARIADB_VERSION}
113119
tmpfs:
@@ -127,6 +133,8 @@ services:
127133
entrypoint: /oracle_entrypoint.sh python tests/runtests.py
128134
depends_on:
129135
- oracle-db
136+
- memcached
137+
- memcached2
130138
oracle-db:
131139
image: sath89/oracle-12c
132140
volumes:
@@ -135,7 +143,7 @@ services:
135143
- WEB_CONSOLE=false
136144

137145
memcached: &memcached
138-
image: memcached:1.5-alpine
146+
image: memcached
139147

140148
memcached2:
141149
<<: *memcached

settings/test_mariadb.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@
2727
PASSWORD_HASHERS = [
2828
'django.contrib.auth.hashers.MD5PasswordHasher',
2929
]
30+
31+
CACHES = {
32+
'default': {
33+
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
34+
},
35+
'memcached': {
36+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
37+
'LOCATION': 'memcached:11211',
38+
'KEY_PREFIX': '1:'
39+
},
40+
'memcached_2': {
41+
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
42+
'LOCATION': 'memcached2:11211',
43+
'KEY_PREFIX': '2:'
44+
}
45+
}

settings/test_mysql.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@
2727
PASSWORD_HASHERS = [
2828
'django.contrib.auth.hashers.MD5PasswordHasher',
2929
]
30+
31+
CACHES = {
32+
'default': {
33+
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
34+
},
35+
'memcached': {
36+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
37+
'LOCATION': 'memcached:11211',
38+
'KEY_PREFIX': '1:'
39+
},
40+
'memcached_2': {
41+
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
42+
'LOCATION': 'memcached2:11211',
43+
'KEY_PREFIX': '2:'
44+
}
45+
}

settings/test_oracle.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,19 @@
2929
PASSWORD_HASHERS = [
3030
'django.contrib.auth.hashers.MD5PasswordHasher',
3131
]
32+
33+
CACHES = {
34+
'default': {
35+
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
36+
},
37+
'memcached': {
38+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
39+
'LOCATION': 'memcached:11211',
40+
'KEY_PREFIX': '1:'
41+
},
42+
'memcached_2': {
43+
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
44+
'LOCATION': 'memcached2:11211',
45+
'KEY_PREFIX': '2:'
46+
}
47+
}

settings/test_postgres.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,19 @@
3535
PASSWORD_HASHERS = [
3636
'django.contrib.auth.hashers.MD5PasswordHasher',
3737
]
38+
39+
CACHES = {
40+
'default': {
41+
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
42+
},
43+
'memcached': {
44+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
45+
'LOCATION': 'memcached:11211',
46+
'KEY_PREFIX': '1:'
47+
},
48+
'memcached_2': {
49+
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
50+
'LOCATION': 'memcached2:11211',
51+
'KEY_PREFIX': '2:'
52+
}
53+
}

0 commit comments

Comments
 (0)