Log message #1110433

# At Username Text
# Oct 22nd 2009, 14:19 markstory you are loading 10 million rows into memory and then showing 20.
# Oct 22nd 2009, 14:19 joeb nicoleG: I thought you meant that you had some big static array that you wanted to essentially paginate through.
# Oct 22nd 2009, 14:19 markstory nicoleG: just think if you have 10million rows.
# Oct 22nd 2009, 14:19 nicoleG damn
# Oct 22nd 2009, 14:19 markstory generating html is free most times incomparison to quering and processing.
# Oct 22nd 2009, 14:19 joeb nicoleG: Oh, then yeah, array_slice != what you want.
# Oct 22nd 2009, 14:19 alan|macbook okaaaay... Back on track...
# Oct 22nd 2009, 14:18 nicoleG but i need to paginate the data still
# Oct 22nd 2009, 14:18 joeb Oh, yeah. I thought they meant for just some big array, how to get a chunk out.
# Oct 22nd 2009, 14:18 nicoleG markstory, i have a query that's not using model relationships
# Oct 22nd 2009, 14:18 markstory pagination is supposed to make the server load lighter.
# Oct 22nd 2009, 14:18 joeb markstory: ?
# Oct 22nd 2009, 14:18 nicoleG ok, thanks
# Oct 22nd 2009, 14:18 markstory but you are kind of missing the train on pagination if you use array slice.
# Oct 22nd 2009, 14:17 joeb nicoleG: array_slice.
# Oct 22nd 2009, 14:17 markstory nicoleG: no
# Oct 22nd 2009, 14:17 nicoleG can i use the paginate method to paginate an array that's not a model?
# Oct 22nd 2009, 14:17 ADmad yup just the url is surely not enough
# Oct 22nd 2009, 14:17 markstory well part of the problem is its impossible to write a userland helper that does what cache helper does.
# Oct 22nd 2009, 14:17 joeb My patch attempts to create a directory for the HTTP_HOST to store the cache files in. If it can't it just prepends the HTTP_HOST after it has been passed through Inflector::slug
# Oct 22nd 2009, 14:16 markstory unless you are doing a multisite thing there isn't much in /posts/view/4 that indicates what theme/view file should be used.
# Oct 22nd 2009, 14:16 ADmad so i guess it needs more refactoring to support caching of themed views
# Oct 22nd 2009, 14:16 ADmad hmm
# Oct 22nd 2009, 14:15 markstory ADmad: that is after the cache file has been picked.
# Oct 22nd 2009, 14:15 ADmad markstory: you can choose to run beforeFilter for cached pages too
# Oct 22nd 2009, 14:15 joeb I was just using the HTTP_HOST variable.
# Oct 22nd 2009, 14:15 joeb Well, the Dispatcher doesn't know the theme yet though.
# Oct 22nd 2009, 14:15 ADmad generate cache keys/filenames based on selected theme ?
# Oct 22nd 2009, 14:14 markstory when the cache is read the code has no access to theme information.
# Oct 22nd 2009, 14:14 markstory how is cached views supposed to work with themes?
# Oct 22nd 2009, 14:14 ADmad cool.. know what for the devs to check/respond
# Oct 22nd 2009, 14:14 joeb Yeah, I wasn't sure exactly with that. With the themeview I kinda assumed I guess =/
# Oct 22nd 2009, 14:13 ADmad also your ticket should say something like "caching doesnt work as expected for themed views".. although you can cake isnt exactly supposed to support running multiple sites off single app
# Oct 22nd 2009, 14:13 joeb Okay. patch attached.
# Oct 22nd 2009, 14:12 joeb Will do, thanks.
# Oct 22nd 2009, 14:12 ADmad bin the diff and add link to ticket.. or fork the cakephp on code.cakephp and make changes to it and and add the commit link to ticket
# Oct 22nd 2009, 14:10 joeb I'm digging through my commits to get the one that fixed it. I'll put it up in a sec
# Oct 22nd 2009, 14:10 joeb It didn't have a spot for uploading a file
# Oct 22nd 2009, 14:09 ADmad no patch?
# Oct 22nd 2009, 14:08 joeb Okay. I submitted a ticket.
# Oct 22nd 2009, 14:08 t0nic I don't think it goes in Tag as it only pertains to tag vis-a-vis video and I to be able to add tags with their own rules