6.0.0-beta1
7/4/25

[#11045] Listshares cache is not beeing used when previous result is an empty array
Summary Listshares cache is not beeing used when previous result is an empty array
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester goncalo.queiros (at) portugalmail (dot) net
Created 03/01/2012 (4873 days ago)
Due
Updated 08/29/2012 (4692 days ago)
Assigned 03/08/2012 (4866 days ago)
Resolved 03/08/2012 (4866 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
08/29/2012 12:32:38 PM Git Commit Comment #12 Reply to this comment
Changes have been made in Git (master):

commit 0cdd9e9d58135f152973c3c4648f32f312d8bb92
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 16:44:44 2012 -0500

     Revert "Revert "[mjr] Properly cache empty listShares results 
(Bug #11045).""

     This reverts commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/0cdd9e9d58135f152973c3c4648f32f312d8bb92
08/29/2012 12:32:34 PM Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Mar 8 12:38:11 2012 -0700

     Revert "[mjr] Properly cache empty listShares results (Bug #11045)."

     This reverts commit fc4877ab48a28d5375f7a42af4989e179c24f58c.

     This is causing fatal errors on any access to Turba.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
08/29/2012 12:32:25 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git (master):

commit fc4877ab48a28d5375f7a42af4989e179c24f58c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 00:18:02 2012 -0500

     [mjr] Properly cache empty listShares results (Bug #11045).

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/fc4877ab48a28d5375f7a42af4989e179c24f58c
03/14/2012 05:05:52 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #9 Reply to this comment
Sorry forgot to check the develop branch
This has been fixed already.
03/14/2012 03:14:00 PM Jan Schneider Comment #8 Reply to this comment
This has been fixed already.
03/14/2012 02:58:16 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #7 Reply to this comment
List shares is now caching a false value if $sharelist is empty.
$this->_listcache[$key] = empty($sharelist) ? false : $sharelist;

The problem is that on the first run the method will return false, but 
on the second run, because of:
return is_array($this->_listcache[$key]) ? $this->_listcache[$key] : array();

it will return an empty array.
Shouldn't it always return an empty array?
03/08/2012 09:48:54 PM Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
Typo fixed by:

55f60efb24d39dd1758a21b130a71e058d457462
03/08/2012 09:47:16 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (develop):

commit 0cdd9e9d58135f152973c3c4648f32f312d8bb92
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 16:44:44 2012 -0500

     Revert "Revert "[mjr] Properly cache empty listShares results 
(Bug #11045).""

     This reverts commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/0cdd9e9d58135f152973c3c4648f32f312d8bb92
03/08/2012 07:40:57 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (develop):

commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Mar 8 12:38:11 2012 -0700

     Revert "[mjr] Properly cache empty listShares results (Bug #11045)."

     This reverts commit fc4877ab48a28d5375f7a42af4989e179c24f58c.

     This is causing fatal errors on any access to Turba.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
03/08/2012 07:39:59 PM Michael Slusarz Comment #3
State ⇒ Assigned
Reply to this comment
Reverted - causing fatal errors on any page that accesses Turba's API.  Error:

Fatal error: Call to a member function get() on a non-object in 
/disk2/src/horde/turba/lib/Turba.php on line 452
03/08/2012 05:20:50 AM Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Resolved
 
03/08/2012 05:18:56 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (develop):

commit fc4877ab48a28d5375f7a42af4989e179c24f58c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 00:18:02 2012 -0500

     [mjr] Properly cache empty listShares results (Bug #11045).

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/fc4877ab48a28d5375f7a42af4989e179c24f58c
03/01/2012 07:30:25 PM goncalo (dot) queiros (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Listshares cache is not beeing used when previous result is an empty array
Type ⇒ Bug
Reply to this comment
The listshares stores an empty array on cache, but when it verifies 
the existence of cache, it check if the value is !empty

Saved Queries