[Dbix-class] Caching solutions for DBIx::Class
Jul 3, 2011 at 5:53 pm
"Alex" == Alex Povolotsky writes:
Alex> Good; how can I set default cache_time for all searches
Alex> without explicit cache_time?
Have a look at the resultset_attributes method in
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Shadowcat Systems Ltd. Want a managed development or deployment platform?
: Good; how can I set default cache_time for all searches without explicit cache_time? Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20110703/b836ace8/attachment.htm
: This is the full configuration for my model, which includes heavy caching (it's a readonly access to a data warehouse which gets updated once a day): Model::MyDB: traits: - Caching - SchemaProxy default_resultset_attributes: cache_for: 3600 # cache results for one our connect_info: dsn: 'dbd:mysql:host=22.214.171.124;database=test' user: test password: test The 'Caching' trait is what allows you to use the DBIx::Class::Cursor::Cached caching. The SchemaProxy trait allows you to specify the
: Hola Jorge, first of all many thanks for sharing your tips. On Mon, Jul 4, 2011 at 10:46 AM, Jorge Gonzalez wrote: [snipped] I have one question, though: I have a number of essentially static tables (very infrequent changes), and some tables that change a lot during a session (e.g. those that store data from the user's session, for persistency across logins). Is there a way to exclude specific tables from the caching? I've read the docs and I see I can specify the caching (yes/no, TTL) for
: I can't check it out now, but my best bet would be the following: a) do as I told in my prior email, so you specify caching strategy for most of your tables with almost no effort. b) for the tables wich you want to have a different caching policy, modify the resultset_attributes parameter for that class in the Schema class configuration (in the file part which is not rewritten when regenerating the schema). Please try :-) J. El 04/07/11, Fernan Aguero escribi?:
[Dbix-class] updating a has_many relationship failure
[Dbix-class] many to many insert
[Dbix-class] Concats and Group Concats
[Dbix-class] question about DBIx::Class::HTMLWidget
[Dbix-class] question about adding custom methods to DBIx Classes
[Dbix-class] Where to "encourage" UTF8...
[Dbix-class] introspection/reflection - finding the 'many to many' relationships of a ResultSource
[Dbix-class] DBIC Fixtures
[Dbix-class] I'm sure it's not a caching problem, but...
4 of 8
Jul 2, '11 at 7:39a
Jul 4, '11 at 5:32p
5 users in discussion
Fernan Aguero (2)
Jorge Gonzalez (2)
Alex Povolotsky (2)
Eden Cardim (1)
Justin Hunter (1)
Groups & Organizations
site design / logo © 2021 Grokbase