Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
f2ff87dc
Commit
f2ff87dc
authored
Jan 24, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset cache listing categories for ZSQLCatalog when base categories are edited
parent
0ac23f1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
product/ERP5/Tool/CategoryTool.py
product/ERP5/Tool/CategoryTool.py
+5
-1
No files found.
product/ERP5/Tool/CategoryTool.py
View file @
f2ff87dc
...
@@ -40,6 +40,7 @@ from Products.ERP5Type.Core.Folder import OFS_HANDLER
...
@@ -40,6 +40,7 @@ from Products.ERP5Type.Core.Folder import OFS_HANDLER
from
Products.ERP5Type.CopySupport
import
CopyContainer
from
Products.ERP5Type.CopySupport
import
CopyContainer
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
Products.ERP5Type.Cache
import
caching_instance_method
from
Products.ERP5Type.Cache
import
caching_instance_method
from
Products.ERP5Type.dynamic
import
portal_type_class
from
zLOG
import
LOG
from
zLOG
import
LOG
...
@@ -84,7 +85,10 @@ class CategoryTool(CopyContainer, CMFCategoryTool, BaseTool):
...
@@ -84,7 +85,10 @@ class CategoryTool(CopyContainer, CMFCategoryTool, BaseTool):
def
hasContent
(
self
,
id
):
def
hasContent
(
self
,
id
):
return
id
in
self
.
objectIds
()
return
id
in
self
.
objectIds
()
@
caching_instance_method
(
id
=
'portal_categories.getBaseCategoryDict'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
lambda
m
,
*
a
,
**
k
:
m
)
@
caching_instance_method
(
id
=
'portal_categories.getBaseCategoryDict'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
lambda
*
a
:
portal_type_class
.
last_sync
)
def
getBaseCategoryDict
(
self
):
def
getBaseCategoryDict
(
self
):
"""
"""
Cached method to which resturns a dict with category names as keys, and None as values.
Cached method to which resturns a dict with category names as keys, and None as values.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment