Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
254a3712
Commit
254a3712
authored
Apr 25, 2015
by
Boris Kocherov
Committed by
Vincent Pelletier
Apr 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for SQLCatalog caching only transactional_cache_decorator is used
caching_instance_method not used
parent
15a947a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+3
-27
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
254a3712
...
@@ -80,11 +80,9 @@ def noReadOnlyTransactionCache():
...
@@ -80,11 +80,9 @@ def noReadOnlyTransactionCache():
yield
yield
try
:
try
:
from
Products.ERP5Type.Cache
import
\
from
Products.ERP5Type.Cache
import
\
readOnlyTransactionCache
,
caching_instance_method
readOnlyTransactionCache
except
ImportError
:
except
ImportError
:
LOG
(
'SQLCatalog'
,
WARNING
,
'Count not import caching_instance_method, expect slowness.'
)
LOG
(
'SQLCatalog'
,
WARNING
,
'Count not import caching_instance_method, expect slowness.'
)
def
caching_instance_method
(
*
args
,
**
kw
):
return
lambda
method
:
method
readOnlyTransactionCache
=
noReadOnlyTransactionCache
readOnlyTransactionCache
=
noReadOnlyTransactionCache
try
:
try
:
...
@@ -1092,10 +1090,7 @@ class Catalog(Folder,
...
@@ -1092,10 +1090,7 @@ class Catalog(Folder,
pass
pass
return
tuple
(
result_list
)
return
tuple
(
result_list
)
@
caching_instance_method
(
id
=
'SQLCatalog.getColumnIds'
,
@
transactional_cache_decorator
(
'SQLCatalog.getColumnIds'
)
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
_getColumnIds
(
self
):
def
_getColumnIds
(
self
):
keys
=
set
()
keys
=
set
()
add_key
=
keys
.
add
add_key
=
keys
.
add
...
@@ -1121,10 +1116,6 @@ class Catalog(Folder,
...
@@ -1121,10 +1116,6 @@ class Catalog(Folder,
security
.
declarePrivate
(
'getColumnMap'
)
security
.
declarePrivate
(
'getColumnMap'
)
@
transactional_cache_decorator
(
'SQLCatalog.getColumnMap'
)
@
transactional_cache_decorator
(
'SQLCatalog.getColumnMap'
)
@
caching_instance_method
(
id
=
'SQLCatalog.getColumnMap'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
getColumnMap
(
self
):
def
getColumnMap
(
self
):
"""
"""
Calls the show column method and returns dictionnary of
Calls the show column method and returns dictionnary of
...
@@ -1139,10 +1130,6 @@ class Catalog(Folder,
...
@@ -1139,10 +1130,6 @@ class Catalog(Folder,
security
.
declarePrivate
(
'getResultColumnIds'
)
security
.
declarePrivate
(
'getResultColumnIds'
)
@
transactional_cache_decorator
(
'SQLCatalog.getResultColumnIds'
)
@
transactional_cache_decorator
(
'SQLCatalog.getResultColumnIds'
)
@
caching_instance_method
(
id
=
'SQLCatalog.getResultColumnIds'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
getResultColumnIds
(
self
):
def
getResultColumnIds
(
self
):
"""
"""
Calls the show column method and returns dictionnary of
Calls the show column method and returns dictionnary of
...
@@ -1156,10 +1143,6 @@ class Catalog(Folder,
...
@@ -1156,10 +1143,6 @@ class Catalog(Folder,
security
.
declarePrivate
(
'getSortColumnIds'
)
security
.
declarePrivate
(
'getSortColumnIds'
)
@
transactional_cache_decorator
(
'SQLCatalog.getSortColumnIds'
)
@
transactional_cache_decorator
(
'SQLCatalog.getSortColumnIds'
)
@
caching_instance_method
(
id
=
'SQLCatalog.getSortColumnIds'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
getSortColumnIds
(
self
):
def
getSortColumnIds
(
self
):
"""
"""
Calls the show column method and returns dictionnary of
Calls the show column method and returns dictionnary of
...
@@ -2014,10 +1997,7 @@ class Catalog(Folder,
...
@@ -2014,10 +1997,7 @@ class Catalog(Folder,
"""
"""
return
self
.
sql_catalog_scriptable_keys
return
self
.
sql_catalog_scriptable_keys
@
caching_instance_method
(
id
=
'SQLCatalog.getTableIndex'
,
@
transactional_cache_decorator
(
'SQLCatalog.getTableIndex'
)
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
_getTableIndex
(
self
,
table
):
def
_getTableIndex
(
self
,
table
):
table_index
=
{}
table_index
=
{}
method
=
getattr
(
self
,
self
.
sql_catalog_index
,
''
)
method
=
getattr
(
self
,
self
.
sql_catalog_index
,
''
)
...
@@ -2549,10 +2529,6 @@ class Catalog(Folder,
...
@@ -2549,10 +2529,6 @@ class Catalog(Folder,
return
kw
return
kw
@
transactional_cache_decorator
(
'SQLCatalog._getSearchKeyDict'
)
@
transactional_cache_decorator
(
'SQLCatalog._getSearchKeyDict'
)
@
caching_instance_method
(
id
=
'SQLCatalog._getSearchKeyDict'
,
cache_factory
=
'erp5_content_long'
,
cache_id_generator
=
generateCatalogCacheId
,
)
def
_getSearchKeyDict
(
self
):
def
_getSearchKeyDict
(
self
):
result
=
{}
result
=
{}
search_key_column_dict
=
{
search_key_column_dict
=
{
...
...
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