Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
862b7cdf
Commit
862b7cdf
authored
Feb 09, 2007
by
pookey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
possible improvements to Cache class
parent
8844515f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Cache.php
lib/Doctrine/Cache.php
+11
-10
No files found.
lib/Doctrine/Cache.php
View file @
862b7cdf
...
...
@@ -289,7 +289,7 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
* @return boolean
*/
public
function
onPreQuery
(
Doctrine_Db_Event
$event
)
{
{
$query
=
$event
->
getQuery
();
$data
=
false
;
...
...
@@ -315,12 +315,13 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
$this
->
_driver
->
save
(
md5
(
serialize
(
$query
)),
$data
);
}
}
if
(
$data
)
if
(
$this
->
success
)
{
$this
->
_data
=
$data
;
else
$this
->
_data
=
array
();
return
true
;
}
}
return
(
bool
)
$data
;
return
false
;
}
/**
* onPreFetch
...
...
@@ -389,12 +390,12 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
$this
->
_driver
->
save
(
md5
(
serialize
(
array
(
$query
,
$event
->
getParams
()))),
$data
);
}
}
if
(
$data
)
if
(
$this
->
success
)
{
$this
->
_data
=
$data
;
else
$this
->
_data
=
array
();
return
true
;
}
}
return
(
bool
)
$data
;
return
false
;
}
}
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