Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Paginating cached data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeremy Burns  
View profile  
 More options Apr 28 2012, 8:49 am
From: Jeremy Burns <jeremybu...@classoutfit.com>
Date: Sat, 28 Apr 2012 05:49:30 -0700 (PDT)
Local: Sat, Apr 28 2012 8:49 am
Subject: Paginating cached data

I have a function that does a whole bunch of complex finds and calculations
to produce an array, which is then cached. Some of the array keys contain
meta data about how the calculation was done and some high level contents
of the results. One of the array keys contains the actual results that I
want to display and paginate. How can I read that array key from cache and
paginate it in a view?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
lowpass  
View profile  
 More options Apr 28 2012, 11:23 am
From: lowpass <zijn.digi...@gmail.com>
Date: Sat, 28 Apr 2012 11:23:55 -0400
Local: Sat, Apr 28 2012 11:23 am
Subject: Re: Paginating cached data
How about using array_slice()? I guess you'd also need your own
ArrayPaginatorComponent|Helper.

On Sat, Apr 28, 2012 at 8:49 AM, Jeremy Burns


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AD7six  
View profile  
 More options Apr 29 2012, 9:25 am
From: AD7six <andydawso...@gmail.com>
Date: Sun, 29 Apr 2012 06:25:09 -0700 (PDT)
Local: Sun, Apr 29 2012 9:25 am
Subject: Re: Paginating cached data

On Saturday, 28 April 2012 14:49:30 UTC+2, Jeremy Burns wrote:

> I have a function that does a whole bunch of complex finds and
> calculations to produce an array, which is then cached. Some of the array
> keys contain meta data about how the calculation was done and some high
> level contents of the results. One of the array keys contains the actual
> results that I want to display and paginate. How can I read that array key
> from cache and paginate it in a view?

Couldn't you use
https://github.com/cakephp/datasources/blob/2.0/Model/Datasource/Arra...
on your cached result?

Cheers,

AD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Burns | Class Outfit  
View profile  
 More options Apr 30 2012, 12:02 am
From: Jeremy Burns | Class Outfit <jeremybu...@classoutfit.com>
Date: Mon, 30 Apr 2012 05:02:55 +0100
Local: Mon, Apr 30 2012 12:02 am
Subject: Re: Paginating cached data

It's a 1.3 app, unfortunately. I've almost cracked it and will post back here - hopefully later today.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 29 Apr 2012, at 14:25:09, AD7six wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AD7six  
View profile  
 More options Apr 30 2012, 4:21 am
From: AD7six <andydawso...@gmail.com>
Date: Mon, 30 Apr 2012 01:21:40 -0700 (PDT)
Local: Mon, Apr 30 2012 4:21 am
Subject: Re: Paginating cached data

On Monday, 30 April 2012 06:02:55 UTC+2, Jeremy Burns wrote:

> It's a 1.3 app, unfortunately. I've almost cracked it and will post back
> here - hopefully later today.

The datasources repo is 2.x and 1.3

AD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gremlin  
View profile  
 More options May 1 2012, 12:14 pm
From: gremlin <abba.bry...@gmail.com>
Date: Tue, 1 May 2012 09:14:51 -0700 (PDT)
Local: Tues, May 1 2012 12:14 pm
Subject: Re: Paginating cached data

Use the 1.3 ArrayDatasource and set the $records member variable to the
part of the array you need to use as if it came from a DB in the
constructor. Then you can do whatever you want with it. It should be pretty
straightforward.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »