Skip to content

Commit

Permalink
Merge branch 'fix/memcached' of https://github.com/girardinsamuel/mas…
Browse files Browse the repository at this point in the history
…onite into girardinsamuel-fix/memcached
  • Loading branch information
josephmancuso committed Mar 12, 2024
2 parents 5ade175 + 8c3abd8 commit ecd75ea
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json


class MemcacheDriver:
class MemcachedDriver:
def __init__(self, application):
self.application = application
self.connection = None
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/cache/drivers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .FileDriver import FileDriver
from .RedisDriver import RedisDriver
from .MemcacheDriver import MemcacheDriver
from .MemcachedDriver import MemcachedDriver
4 changes: 2 additions & 2 deletions src/masonite/providers/CacheProvider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .Provider import Provider
from ..cache import Cache
from ..cache.drivers import FileDriver, RedisDriver, MemcacheDriver
from ..cache.drivers import FileDriver, RedisDriver, MemcachedDriver
from ..configuration import config


Expand All @@ -12,7 +12,7 @@ def register(self):
cache = Cache(self.application).set_configuration(config("cache.stores"))
cache.add_driver("file", FileDriver(self.application))
cache.add_driver("redis", RedisDriver(self.application))
cache.add_driver("memcache", MemcacheDriver(self.application))
cache.add_driver("memcached", MemcachedDriver(self.application))
self.application.bind("cache", cache)

def boot(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/features/cache/test_memcache_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestMemcacheCache(TestCase):
def setUp(self):
super().setUp()
self.application.make("cache")
self.driver = self.application.make("cache").store("memcache")
self.driver = self.application.make("cache").store("memcached")

def test_can_add_file_driver(self):
self.assertEqual(self.driver.add("add_key", "value"), "value")
Expand Down
4 changes: 2 additions & 2 deletions tests/integrations/config/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"password": "",
"name": "masonite4",
},
"memcache": {
"driver": "memcache",
"memcached": {
"driver": "memcached",
"host": "127.0.0.1",
"port": "11211",
"password": "",
Expand Down

0 comments on commit ecd75ea

Please sign in to comment.