Help for this page

Select Code to Download


  1. or download this
        $one = MyObject->get(123);
        $two = MyObject->get(123);
    
        refaddr($one) == refaddr($two)
    
  2. or download this
    -> the in memory cache
      -> memcached
        -> the DB
    
  3. or download this
        GET doc 123        -> returns version 6
        SEARCH for doc 123 -> returns version 5
    
  4. or download this
        $a = get     -> version 1
        $b = search  -> version 1
    
  5. or download this
        $a = get     -> version 1
        $b = search  -> version 1
        $a->change()
        $a->save()   -> version 2
    
  6. or download this
        $a = get     -> version 2
        $b = search  -> version 1
    
  7. or download this
        $a = get     -> version 1
        $a->change()
        $b = search  -> version 1
    
  8. or download this
        $a = get     -> version 1
        $a->change()
        $b = search  -> version 2
    
  9. or download this
        my ($class,$id,$version,$data) = @_;
    
        if (my $cached = $cache->{$id}) {
    ...
    
        }
        return $cache->{$id} = $class->new($data);