Example #1
0
class Cache_Model(object):
    """@Cache_Model

    This class provides an interface to cache, and uncache the redis hash
    data structure.  Specifically, necessary data components is passed into the
    corresponding class method, which allow computed model(s) to be stored into
    a NoSQL datastore.

    Note: this class explicitly inherits the 'new-style' class.

    """
    def __init__(self, model=None):
        """@__init__

        This constructor is responsible for defining class variables, as well
        as starting the redis client, in order to perform corresponding
        caching, and uncaching.

        """

        # class variables
        self.model = model
        self.list_error = []
        self.myRedis = Redis_Query()

        # start redis client
        try:
            self.myRedis.start_redis()
        except Exception, error:
            self.list_error.append(str(error))
Example #2
0
class Cache_Model(object):
    '''

    This class provides an interface to cache, and uncache the redis hash
    data structure.  Specifically, necessary data components is passed into the
    corresponding class method, which allow computed model(s) to be stored into
    a NoSQL datastore.

    Note: this class explicitly inherits the 'new-style' class.

    '''

    def __init__(self, model=None):
        '''

        This constructor is responsible for defining class variables, as well
        as starting the redis client, in order to perform corresponding
        caching, and uncaching.

        '''

        # class variables
        self.model = model
        self.list_error = []
        self.myRedis = Redis_Query()

        # start redis client
        try:
            self.myRedis.start_redis()
        except Exception, error:
            self.list_error.append(str(error))
Example #3
0
class Cache_Hset(object):
    '''@Cache_Hset

    This class provides an interface to cache, and uncache the redis hash
    data structure.  Specifically, necessary data components is passed into the
    corresponding class method.

    Note: this class explicitly inherits the 'new-style' class.

    '''
    def __init__(self):
        '''@__init__

        This constructor is responsible for defining class variables, as well
        as starting the redis client, in order to perform corresponding
        caching, and uncaching.

        '''

        # class variables
        self.list_error = []
        self.myRedis = Redis_Query()

        # start redis client
        try:
            self.myRedis.start_redis()
        except Exception, error:
            self.list_error.append(str(error))
class Cache_Hset(object):
    """@Cache_Hset

    This class provides an interface to cache, and uncache the redis hash
    data structure.  Specifically, necessary data components is passed into the
    corresponding class method.

    Note: this class explicitly inherits the 'new-style' class.

    """

    def __init__(self):
        """@__init__

        This constructor is responsible for defining class variables, as well
        as starting the redis client, in order to perform corresponding
        caching, and uncaching.

        """

        # class variables
        self.list_error = []
        self.myRedis = Redis_Query()

        # start redis client
        try:
            self.myRedis.start_redis()
        except Exception, error:
            self.list_error.append(str(error))
class Cache_Hset(object):

    ## constructor
    def __init__(self):
        # class variables
        self.list_error = []
        self.myRedis    = Redis_Query()

        # start redis client
        try:
            self.myRedis.start_redis()
        except Exception, error:
            self.list_error.append(str(error))