~free.ekanayaka/storm/any-expr

« back to all changes in this revision

Viewing changes to storm/store.py

  • Committer: Jamu Kakar
  • Date: 2009-11-29 00:42:19 UTC
  • Revision ID: jkakar@kakar.ca-20091129004219-urbeb0bg5t92nuuk
- The Cache instance created for a Store instance, when one isn't
  explicitly provided, no longer specifies a size.  The size
  specified by the Cache, 1000 items, is used instead.  The
  docstring for Store.__init__ has been updated to reflect this
  change [trivial].

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    def __init__(self, database, cache=None):
67
67
        """
68
68
        @param database: The L{storm.database.Database} instance to use.
69
 
        @param cache: The cache to use.  Defaults to a L{Cache} storing up to
70
 
            1000 objects at any given time.
 
69
        @param cache: The cache to use.  Defaults to a L{Cache} instance.
71
70
        """
72
71
        self._event = EventSystem(self)
73
72
        self._connection = database.connect(self._event)
75
74
        self._dirty = {}
76
75
        self._order = {} # (info, info) = count
77
76
        if cache is None:
78
 
            self._cache = Cache(100)
 
77
            self._cache = Cache()
79
78
        else:
80
79
            self._cache = cache
81
80
        self._implicit_flush_block_count = 0