Cake cache essentially useless for web2.0 sites?

2007-02-04 Thread TT

One of the nice features of Cake, is that it offers View-caching. At
least, that's what I thought, untill I really wanted to use it. It
turns out your controllers are completely bypassed when you use Cake's
builtin cache. This has the effect you cannot use any helpers etc that
are set from your controllers. BIG problem. Why?
Suppose you have a site that requires your users to login. Now you
save your users in a session, but you build a nice component and
helper for it to access them. Now it turns out you cannot display the
current user on the cached page anymore because you cannot access the
helpers. Or for example you want to protect access to some pages.
Impossible when you want to use caching.
It seems to me that Cake's caching was only build with websites in
mind that don't allow/require users to login. I think this is a BIG
problem for many web2.0 sites. Any plans to change this in Cake 1.2?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Rapid Developement / Bloated Product?

2007-01-16 Thread TT


Both Chris Hartjes and nate thanks for your replies.

@Chris Hartjes : I have already built it (beta version). I totally
agree with you that you should not prematurely optimize. I am not sure
why you think I would do that :)

Actually I already use memcache, apc cache, local array caches,
mysql-query cache etc. All is being used already. But this application
needs to be very well tuned, so that's why I need to optimize further.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Rapid Developement / Bloated Product?

2007-01-15 Thread TT


I would also like to get some more detailed information on optimizing
Cake 1.2. For example getting rid of those thee DESC queries and being
able to cache parts of a page much easier.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Rapid Developement / Bloated Product?

2007-01-15 Thread TT


Cake automatically clears specific cache copies when changes are made
to the database

This always worried me, since I have a website that has lots of writes
(Social model) and it is much more acceptable to show a cached (and
slightly out-of-date) version, then to clear the cache after every
change to the database.

I will take a better look at Cake's source though, perhaps it is
possible to influence the caching so it will not be cleared
automatically after changes :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



#sql_3e3a_0 for COUNT() queries

2006-12-14 Thread TT

Dear bakers,

for some of my queries I use queries that contain a COUNT()  and those
are executed directly by execute() or query().

I do something like this:

COUNT(test.id) AS count

But since count does not belong to any Table, it gets assigned some
random string in the resulting array in CakePHP that looks like
'#sql_3e3a_0'.

My guess this is set by the MySQL driver, but i want to be able to
rename this or overwrite this behaviour in CakePHP. I would like to
rename the random string to 'derived' or something like that, so that
everytime i update the database, i will not get a new random string and
having to update code that uses that variable.

Any idea where to update this in the cake-code?


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
Cake PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: #sql_3e3a_0 for COUNT() queries

2006-12-14 Thread TT

I already found it after digging a bit deeper into mysql/php

The cause is this functionality:
http://cn.php.net/manual/en/function.mysql-fetch-field.php

which is used inside \cake\libs\model\dbo\dbo_mysql.php in function
function resultSet()

CakePHP retrieves the table-names from MySQL by the mysql-fetch-field()
function and that function indeed returns #sql_3e3a_0 as the table-name
for the count-field.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
Cake PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: #sql_3e3a_0 for COUNT() queries

2006-12-14 Thread TT

And here is a complete hack if you want custom named values for the
table-names (I use derived)

function resultSet($results) {
$this-results = $results;
$this-map = array();
$num_fields = mysql_num_fields($results);
$index = 0;
$j = 0;

while ($j  $num_fields) {

$column = mysql_fetch_field($results,$j);
if (!empty($column-table)) {
if (!(strpos($column-table,'#sql_')===false))
{
$this-map[$index++] = array('derived', 
$column-name);
}
else
{
$this-map[$index++] = 
array($column-table, $column-name);
}
} else {
$this-map[$index++] = array(0, $column-name);
}
$j++;
}
}


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
Cake PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread TT

Great work,

installed new version right away and everything works just good.
Switching to lazy-loading is a good decision. CakePHP makes it already
easy enough to program, performance should be another concern and in
this case the decision to go for performance is definately the right
one.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
Cake PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---