summaryrefslogtreecommitdiff
path: root/pynslcd/common.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-01-09 23:53:28 +0100
committerArthur de Jong <arthur@arthurdejong.org>2013-02-08 21:19:19 +0100
commit7c01898fd02c0f71d4632cca27d3fb92554caa18 (patch)
tree1b4ad42ebcffa4c17e34bcaba74fffb36e58f050 /pynslcd/common.py
parentb9395c8f5796d899c61b1133aa313c89b89f5e0d (diff)
disable pynslcd cache for now
Diffstat (limited to 'pynslcd/common.py')
-rw-r--r--pynslcd/common.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/pynslcd/common.py b/pynslcd/common.py
index 3ce0b12..208e321 100644
--- a/pynslcd/common.py
+++ b/pynslcd/common.py
@@ -25,7 +25,7 @@ import ldap
import ldap.dn
from attmap import Attributes
-import cache
+#import cache
import cfg
import constants
@@ -191,10 +191,11 @@ class Request(object):
self.calleruid = calleruid
module = sys.modules[self.__module__]
self.search = getattr(module, 'Search', None)
- if not hasattr(module, 'cache_obj'):
- cache_cls = getattr(module, 'Cache', None)
- module.cache_obj = cache_cls() if cache_cls else None
- self.cache = module.cache_obj
+ #if not hasattr(module, 'cache_obj'):
+ # cache_cls = getattr(module, 'Cache', None)
+ # module.cache_obj = cache_cls() if cache_cls else None
+ #self.cache = module.cache_obj
+ self.cache = None
def read_parameters(self, fp):
"""This method should read the parameters from ths stream and
@@ -205,7 +206,8 @@ class Request(object):
"""This method handles the request based on the parameters read
with read_parameters()."""
try:
- with cache.con:
+ #with cache.con:
+ if True:
for dn, attributes in self.search(conn=self.conn, parameters=parameters):
for values in self.convert(dn, attributes, parameters):
self.fp.write_int32(constants.NSLCD_RESULT_BEGIN)