6.0.0-alpha14
6/29/25

[#9092] Could not save the compiled template file
Summary Could not save the compiled template file
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester rsalmon (at) mbpgroup (dot) com
Created 06/11/2010 (5497 days ago)
Due
Updated 06/17/2010 (5491 days ago)
Assigned 06/15/2010 (5493 days ago)
Resolved 06/17/2010 (5491 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/17/2010 10:02:06 PM Michael Slusarz Comment #6
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
I'm thinking that Horde_Cache_Null simply shouldn't return false on 
set(). Message sent to the dev@ list.
Actually, we should not be in the habit of checking if set() was 
successful at all.  Caching design requires one to always assume that 
set() is not successful.  So remove the boolean return from set() 
entirely.
06/17/2010 10:00:45 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9092: Horde_Cache_Base::set() no longer returns a boolean result

http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Apc.php?rt=horde-git&r1=74e214448a7c9f3f73f1490494b508ef7a918a6a&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Base.php?rt=horde-git&r1=4f7d09cdc8c3a8568a8e9f559be5b431eeeb5384&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Eaccelerator.php?rt=horde-git&r1=74e214448a7c9f3f73f1490494b508ef7a918a6a&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/File.php?rt=horde-git&r1=74e214448a7c9f3f73f1490494b508ef7a918a6a&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Memcache.php?rt=horde-git&r1=74e214448a7c9f3f73f1490494b508ef7a918a6a&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Mock.php?rt=horde-git&r1=535790565bcea823bbb527c13c33f49f7ef1b4ce&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Null.php?rt=horde-git&r1=898136f146cabf99f63c7b29ff6b407f9747ed49&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Sql.php?rt=horde-git&r1=b1bf8f716b5612012fb2023aac6be8d7facd139c&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Stack.php?rt=horde-git&r1=04837db013582f5fe55f92e62fd09e3c09790ce7&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Xcache.php?rt=horde-git&r1=74e214448a7c9f3f73f1490494b508ef7a918a6a&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Cache/package.xml?rt=horde-git&r1=88c5748774287c2bdebc60b77e105556140242b0&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Kolab_Storage/lib/Horde/Kolab/Storage.php?rt=horde-git&r1=4343b7a9079e436ff77770deb9adb6b1f38cc29c&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Cache.php?rt=horde-git&r1=769b289d45be1eca345ea984bfe33c56a074d523&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
http://git.horde.org/diff.php/framework/Template/lib/Horde/Template.php?rt=horde-git&r1=dee7473396b946feab4ead70784673b8b9c5991c&r2=eef3225fadfeb74e4c3550f2a2a7a6369f79a5c1
06/16/2010 02:35:59 AM Chuck Hagenbuch Comment #4 Reply to this comment
I'm thinking that Horde_Cache_Null simply shouldn't return false on 
set(). Message sent to the dev@ list.
06/15/2010 07:15:31 AM rsalmon (at) mbpgroup (dot) com Comment #3 Reply to this comment
Why should Template know about cache driver details?
It's not just Template I guess and it doesn't need to know about cache 
drivers details.

Horde_Cache_Null functions are always returning false.
Using any of other Horde_Cache drivers, returning false means => 
failure/error.
So, my guess is that Template should checked if a cache driver is set, 
eg != Null.
If you want a no-caching layer, why not use the Mock driver?
I just saw a Mock driver file in Horde/Cache, but it isn't available 
through the configuration menu (conf.xml):

    <configswitch name="driver" desc="If you want to enable the Horde Cache,
    select a driver here. This is used to speed up portions of Horde by storing
    commonly processed objects.">file
     <case name="Null" desc="Don't cache any objects"/>
     <case name="Apc" desc="Use the APC cache"/>
     <case name="Eaccelerator" desc="Use the eAccelerator cache (up to version
     0.9.5)">
      <configdescription>
      eAccelerator must be built with --with-eaccelerator-shared-memory at
      compile time to allow caching. &lt;strong&gt;WARNING:&lt;/strong&gt; The
      cache functionality has been removed with eAccelerator version 0.9.6. If
      you want to use the eAccelerator cache driver, you need version 0.9.5 or
      lower.
      </configdescription>
     </case>
     <case name="File" desc="Store objects in filesystem">
      <configsection name="params">
       <configstring name="dir" required="false" desc="The location to 
store the
       cached files"/>
       <configinteger name="sub" required="false" desc="If non-zero, the number
       of subdirectories to create to store the file (see, e.g.,
       http://php.net/manual/en/ref.session.php#ini.session.save-path). When
       creating the directory tree, the md5sum of the cache id will be used.
       Thus, each level of the tree will have up to 16 subdirectories named
       [0-9a-f].">0</configinteger>
       <configstring name="prefix" required="false" desc="The filename 
prefix to
       use for the cache files."/>
      </configsection>
     </case>
     <case name="Memcache" desc="Use a Memcache server"/>
     <case name="Sql" desc="SQL-based cache storage">
      <configsection name="params">
       <configsql switchname="driverconfig">
        <configstring name="table" required="false" desc="The name of the
        cache table in the database [horde_cache]"/>
       </configsql>
      </configsection>
     </case>
     <case name="Xcache" desc="Use the xCache cache"/>
     <case name="Zps4" desc="Use the Zend Performance Suite output cache"/>
    </configswitch>



06/15/2010 02:28:46 AM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Why should Template know about cache driver details? If you want a 
no-caching layer, why not use the Mock driver?
06/11/2010 10:12:25 AM rsalmon (at) mbpgroup (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Could not save the compiled template file
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
horde/conf.php : $conf['cache']['driver'] = 'Null';

I get messages like the following one in /tmp/horde.log

ERR: HORDE [horde] Could not save the compiled template file 
"/var/www/html/horde/config/../templates/admin/setup/index.html". [pid 
13193 on line 247 of "/var/www/html/horde/libs/Horde/Template.php"]

functions from Cache/Null.php always return false. And that why the 
following call fails

      $this->_cache->set($cacheid, $this->_template)


Template.php functions probably should check if the cache driver is 
set to Null or not.

Saved Queries