APC cache is not limited to database queries. You can still overwrite the
API caller to get data from the memory cache if it has not been changed.
Your problem will be whether other services access the same API and alter
data meaning that your local cached copies will be out of date with no way
to determine if you need to bypass that and get the updated data instead,
and even there partial caching will also fall apart for the same reasons.

If you have dev access to the API itself, your best method for efficiency is
then to use caching mechanisms on the API side instead of the client side.

On Wed, Nov 24, 2010 at 9:24 PM, Ken Golovin <ken.golo...@gmail.com> wrote:

> I appreciate your comment, normally I use APC or redis, however for
> the project I am working on it is not always an option as it has no
> ORM and instead uses API calls to an external data source which
> encapsulates a lot of business logic (this is due to legacy systems).
>
> So I desperately need to know if it would be possible to enable
> partials caching for requests that contain a query string?
>
>
> On Nov 23, 7:38 pm, Gareth McCumskey <gmccums...@gmail.com> wrote:
> > Have you considered looking at memory caching mechanisms (using APC Cache
> > for example) to reduce queries to database? Quite simple really by
> > overriding the doSelect, doSelectOne, retrieveByPk and other database
> > retrieval methods. In other words, when a query is sent to the database,
> > check if the result is stored in APC Cache. If it is yank and return, if
> > not, query database and store in memory cache. If a field is being
> altered
> > (save() or delete() methods), remove the record from APC so that the next
> > query gets the updated result. We use this quite extensively on one of
> our
> > projects and has dropped a lot of db load off our server.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Nov 23, 2010 at 1:22 AM, Ken Golovin <ken.golo...@gmail.com>
> wrote:
> > > I would like to be able to cache a partial on a search results page
> > > that uses query strings, however symfony ignores caching settings. The
> > > page onhttp://www.symfony-project.org/reference/1_4/en/09-Cache
> > > says:
> >
> > > "An incoming request with GET parameters in the query string or
> > > submitted with the POST, PUT, or DELETE method will never be cached by
> > > symfony, regardless of the configuration."
> >
> > > Is there any way to override this behaviour?
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to
> > > security at symfony-project.com
> >
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> <symfony-users%2bunsubscr...@goog legroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
> >
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to