Ignore:
Timestamp:
18 Jan 2010, 12:56:17 (15 years ago)
Author:
uli
Message:

Remove caching from CourseSource?. As functional tests turned out,
caching is evil in sources. We can get outdated references to
catalogs, objects etc. which can mean lots of hassle especially with
ZEO setups. So now we get a slightly increased processing time for
mass processing (import of 7.200 certcourses takes three seconds
longer), but that's acceptable compared to the problems arising
otherwise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-importers/src/waeup/interfaces.py

    r4851 r4854  
    2626       up a catalog.
    2727    """
    28     catalog = None
    29     _cached_values = None
    3028    def getValues(self):
    31         if self._cached_values is not None:
    32             return self._cached_values
    33         self.catalog = getUtility(ICatalog, name='courses_catalog')
    34         self._cached_values = list(
    35             self.catalog.searchResults(code=('', 'z*')))
    36         return self._cached_values
     29        catalog = getUtility(ICatalog, name='courses_catalog')
     30        return list(catalog.searchResults(code=('', 'z*')))
    3731
    3832    def getToken(self, value):
Note: See TracChangeset for help on using the changeset viewer.