[Catalyst-commits] r6199 - in
trunk/Catalyst-Model-TextLinkAds/lib/Catalyst: Helper/Model Model
davecardwell at dev.catalyst.perl.org
davecardwell at dev.catalyst.perl.org
Sun Mar 25 21:47:58 GMT 2007
Author: davecardwell
Date: 2007-03-25 21:47:56 +0100 (Sun, 25 Mar 2007)
New Revision: 6199
Modified:
trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Helper/Model/TextLinkAds.pm
trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Model/TextLinkAds.pm
Log:
Fixing caching.
Modified: trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Helper/Model/TextLinkAds.pm
===================================================================
--- trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Helper/Model/TextLinkAds.pm 2007-03-25 18:52:24 UTC (rev 6198)
+++ trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Helper/Model/TextLinkAds.pm 2007-03-25 20:47:56 UTC (rev 6199)
@@ -30,7 +30,7 @@
tmpdir is the path to a directory where temporary files should be stored.
- nocache disables caching and is definitely not recommended.
+ nocache disables caching which is definitely not recommended.
=head1 METHODS
Modified: trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Model/TextLinkAds.pm
===================================================================
--- trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Model/TextLinkAds.pm 2007-03-25 18:52:24 UTC (rev 6198)
+++ trunk/Catalyst-Model-TextLinkAds/lib/Catalyst/Model/TextLinkAds.pm 2007-03-25 20:47:56 UTC (rev 6199)
@@ -31,12 +31,24 @@
use base qw/ Catalyst::Model::TextLinkAds /;
__PACKAGE__->config(
- cache => 0, # optional: see CACHING for default behaviour
+ cache => 0, # optional: default uses Cache::FileCache
tmpdir => '/tmp', # optional: default File::Spec->tmpdir
);
1;
+
+
+ # In the view...
+ <ul>
+ [%- FOREACH link = c.model('TextLinkAds').fetch( my_inventory_key ) %]
+ <li>
+ [% link.beforeText %]
+ <a href="[% link.URL %]">[% link.Text %]</a>
+ [% link.afterText %]
+ </li>
+ [%- END %]
+ </ul>
=head1 DESCRIPTION
@@ -88,18 +100,6 @@
1; # End of the module code; everything from here is documentation...
__END__
-=head1 CACHING
-
-If a cache for C<Catalyst::Model::TextLinkAds> is not explicitly set in the
-Catalyst configuration, this module will attempt to use
-C<$c-E<gt>cache('textlinkads')>, and failing that will fall back to using
-L<Cache::FileCache>.
-
-See L<"Cache Profiles" in Catalyst::Plugin::Cache|
-Catalyst::Plugin::Cache/Cache_Profiles> and L<"cache" in TextLinkAds|
-TextLinkAds/cache> for more information.
-
-
=head1 SEE ALSO
L<Catalyst>, L<Catalyst::Helper::Model::TextLinkAds>, L<TextLinkAds>
More information about the Catalyst-commits
mailing list