collective/collective.taxonomy — pull request #4 by eastxing (2013-02-12 14:06:45+00:00)
Title: Taxonomy "inverted_data" ram cache key calc method bugfix

I found when import several taxonomy at the same time, then used them in a dexterity content type add/edit form, only the first taxnomy will show correctly, the others not get the right title(display). After debug, I found the issue is caused by "inverted_data" ram cache key calc method.

Current code (in utility.py):

```python
class Taxonomy(SimpleItem):
...
@property
@ram.cache(lambda method, self: self.data._p_mtime) # bug line
def inverted_data(self):
inv_data = {}
for (language, elements) in self.data.items():
inv_data[language] = {}
for (path, identifier) in elements.items():
inv_data[language][identifier] = path
return inv_data
```

Change the cache key method to the following fix the bug:

@ram.cache(lambda method, self: (self.name, self.data._p_mtime))