forked from pool/perl-Tie-Cache
Accepting request 249362 from devel:languages:perl
- updated to 0.21
+ fixed internal $VERSION number
+ added cleaner ref() checking for data size calculations when using a MaxBytes cache, to address bug
https://rt.cpan.org/Public/Bug/Display.html?id=69976
+ updated test.pl to "use Tie::Cache" to prevent test conflicts with Cache.pm
- removed outdated Tie-Cache-0.17.diff
OBS-URL: https://build.opensuse.org/request/show/249362
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tie-Cache?expand=0&rev=21
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
--- Cache.pm
|
||||
+++ Cache.pm
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl -w
|
||||
|
||||
package Tie::Cache;
|
||||
use strict;
|
||||
--- test.pl
|
||||
+++ test.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl
|
||||
+#!/usr/bin/perl
|
||||
|
||||
use Cache;
|
||||
use Benchmark;
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:471d26fcdf9cb23504f3e54253e5495707cf270caeded5fc777f206e1902e7d9
|
||||
size 11627
|
||||
3
Tie-Cache-0.21.tar.gz
Normal file
3
Tie-Cache-0.21.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d7eaa22f35a21b226f2bfd17782cd4226a584a2364659cd7bf8b24fe37f6fe89
|
||||
size 11200
|
||||
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 15 15:44:32 UTC 2014 - coolo@suse.com
|
||||
|
||||
- updated to 0.21
|
||||
+ fixed internal $VERSION number
|
||||
+ added cleaner ref() checking for data size calculations when using a MaxBytes cache, to address bug
|
||||
https://rt.cpan.org/Public/Bug/Display.html?id=69976
|
||||
+ updated test.pl to "use Tie::Cache" to prevent test conflicts with Cache.pm
|
||||
- removed outdated Tie-Cache-0.17.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 11:08:35 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Tie-Cache
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,56 +15,58 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: perl-Tie-Cache
|
||||
Version: 0.17
|
||||
Release: 388
|
||||
AutoReqProv: on
|
||||
Version: 0.21
|
||||
Release: 0
|
||||
%define cpan_name Tie-Cache
|
||||
Summary: LRU Cache in Memory
|
||||
License: GPL-1.0+ or Artistic-1.0
|
||||
Group: Development/Libraries/Perl
|
||||
License: Artistic-1.0
|
||||
Url: http://cpan.org/modules/by-module/Tie
|
||||
Summary: Perl module Tie::Cache
|
||||
Source: Tie-Cache-%{version}.tar.gz
|
||||
Patch: Tie-Cache-%{version}.diff
|
||||
Url: http://search.cpan.org/dist/Tie-Cache/
|
||||
Source: http://www.cpan.org/authors/id/C/CH/CHAMAS/%{cpan_name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{perl_requires}
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
This module implements a least recently used (LRU) cache in memory
|
||||
through a tie interface.
|
||||
This module implements a least recently used (LRU) cache in memory through
|
||||
a tie interface. Any time data is stored in the tied hash, that key/value
|
||||
pair has an entry time associated with it, and as the cache fills up, those
|
||||
members of the cache that are the oldest are removed to make room for new
|
||||
entries.
|
||||
|
||||
So, the cache only "remembers" the last written entries, up to the size of
|
||||
the cache. This can be especially useful if you access great amounts of
|
||||
data, but only access a minority of the data a majority of the time.
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Joshua Chamas <chamas@alumni.stanford.org>
|
||||
The implementation is a hash, for quick lookups, overlaying a doubly linked
|
||||
list for quick insertion and deletion. On a WinNT PII 300, writes to the
|
||||
hash were done at a rate 3100 per second, and reads from the hash at 6300
|
||||
per second. Work has been done to optimize refreshing cache entries that
|
||||
are frequently read from, code like $cache{entry}, which moves the entry to
|
||||
the end of the linked list internally.
|
||||
|
||||
%prep
|
||||
%setup -n Tie-Cache-%{version}
|
||||
%patch
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
find . -type f -print0 | xargs -0 chmod 644
|
||||
|
||||
%build
|
||||
perl Makefile.PL
|
||||
make %{?_smp_mflags}
|
||||
make test
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README CHANGES bench.pl
|
||||
%doc %{_mandir}/man?/*
|
||||
%{perl_vendorlib}/Tie
|
||||
%{perl_vendorarch}/auto/Tie
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc CHANGES README
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user