Showing 4 changed files with 17 additions and 31 deletions
+4
Changes
... ...
@@ -1,3 +1,7 @@
1
+0.1666
2
+    - removed from cache() and cache_method() document for a while and cache() value
3
+      become 0 because I find something bug.
4
+    
1 5
 0.1665
2 6
     - removed EXPERIMETNAL flag from insert_at(), update_at(), delete_at(), select_at(), insert_param(), not_exists(), select()'s query option, update_param(), where, table tag, each column, safety_character, DBIx::Where, where().
3 7
     - added EXPERIMETNAL create_model()
+2 -31
lib/DBIx/Custom.pm
... ...
@@ -1,6 +1,6 @@
1 1
 package DBIx::Custom;
2 2
 
3
-our $VERSION = '0.1665';
3
+our $VERSION = '0.1666';
4 4
 
5 5
 use 5.008001;
6 6
 use strict;
... ...
@@ -23,7 +23,7 @@ our @COMMON_ARGS = qw/table query filter type/;
23 23
 
24 24
 __PACKAGE__->attr(
25 25
     [qw/data_source password pid user/],
26
-    cache => 1,
26
+    cache => 0,
27 27
     cache_method => sub {
28 28
         sub {
29 29
             my $self = shift;
... ...
@@ -1550,14 +1550,6 @@ L<DBIx::Custom Wiki|https://github.com/yuki-kimoto/DBIx-Custom/wiki>
1550 1550
 
1551 1551
 =head1 ATTRIBUTES
1552 1552
 
1553
-=head2 C<cache>
1554
-
1555
-    my $cache = $dbi->cache;
1556
-    $dbi      = $dbi->cache(1);
1557
-
1558
-Enable caching L<DBIx::Custom::Query>,
1559
-default to 1.
1560
-
1561 1553
 =head2 C<data_source>
1562 1554
 
1563 1555
     my $data_source = $dbi->data_source;
... ...
@@ -1688,27 +1680,6 @@ You can set multiple filters at once.
1688 1680
         }
1689 1681
     );
1690 1682
 
1691
-=head2 C<cache_method>
1692
-
1693
-    $dbi          = $dbi->cache_method(\&cache_method);
1694
-    $cache_method = $dbi->cache_method
1695
-
1696
-Method to set and get cache.
1697
-Default to the following one.
1698
-
1699
-    sub {
1700
-        my $self = shift;
1701
-        
1702
-        $self->{_cached} ||= {};
1703
-        
1704
-        if (@_ > 1) {
1705
-            $self->{_cached}{$_[0]} = $_[1];
1706
-        }
1707
-        else {
1708
-            return $self->{_cached}{$_[0]};
1709
-        }
1710
-    }
1711
-
1712 1683
 =head2 C<connect>
1713 1684
 
1714 1685
     my $dbi = DBIx::Custom->connect(
+1
t/dbix-custom-core-sqlite.t
... ...
@@ -513,6 +513,7 @@ ok(! $result->fetch_first, "rollback");
513 513
 
514 514
 test 'cache';
515 515
 $dbi = DBIx::Custom->connect($NEW_ARGS->{0});
516
+$dbi->cache(1);
516 517
 $dbi->execute($CREATE_TABLE->{0});
517 518
 $source = 'select * from table1 where {= key1} and {= key2};';
518 519
 $dbi->create_query($source);
+10
xt/time-piece.t
... ...
@@ -0,0 +1,10 @@
1
+use Test::More 'no_plan';
2
+
3
+use strict;
4
+use warnings;
5
+use DBIx::Custom;
6
+
7
+my $dbi = DBIx::Custom->connect('dbi:SQLite:dbname=:memory:');
8
+
9
+
10
+