2007-01-15 23:32:00 +00:00
|
|
|
#
|
2011-11-17 15:54:49 +00:00
|
|
|
# spec file for package perl-Tie-Cache
|
2007-01-15 23:32:00 +00:00
|
|
|
#
|
2014-09-15 15:52:07 +00:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:32:00 +00:00
|
|
|
#
|
2009-06-18 15:14:13 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2007-01-15 23:32:00 +00:00
|
|
|
#
|
|
|
|
|
2009-06-18 15:14:13 +00:00
|
|
|
|
|
|
|
Name: perl-Tie-Cache
|
2014-09-15 15:52:07 +00:00
|
|
|
Version: 0.21
|
|
|
|
Release: 0
|
|
|
|
%define cpan_name Tie-Cache
|
|
|
|
Summary: LRU Cache in Memory
|
|
|
|
License: GPL-1.0+ or Artistic-1.0
|
2009-06-18 15:14:13 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2014-09-15 15:52:07 +00:00
|
|
|
Url: http://search.cpan.org/dist/Tie-Cache/
|
|
|
|
Source: http://www.cpan.org/authors/id/C/CH/CHAMAS/%{cpan_name}-%{version}.tar.gz
|
2025-08-12 18:18:11 +02:00
|
|
|
Source100: README.md
|
2014-09-15 15:52:07 +00:00
|
|
|
BuildArch: noarch
|
2009-06-18 15:14:13 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-10-20 13:21:09 +00:00
|
|
|
BuildRequires: perl
|
2010-12-03 14:54:27 +00:00
|
|
|
BuildRequires: perl-macros
|
2014-09-15 15:52:07 +00:00
|
|
|
%{perl_requires}
|
2007-01-15 23:32:00 +00:00
|
|
|
|
|
|
|
%description
|
2014-09-15 15:52:07 +00:00
|
|
|
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.
|
2007-01-15 23:32:00 +00:00
|
|
|
|
2014-09-15 15:52:07 +00:00
|
|
|
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.
|
2007-01-15 23:32:00 +00:00
|
|
|
|
2014-09-15 15:52:07 +00:00
|
|
|
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.
|
2007-01-15 23:32:00 +00:00
|
|
|
|
|
|
|
%prep
|
2014-09-15 15:52:07 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
find . -type f -print0 | xargs -0 chmod 644
|
2007-01-15 23:32:00 +00:00
|
|
|
|
|
|
|
%build
|
2014-09-15 15:52:07 +00:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
2007-01-15 23:32:00 +00:00
|
|
|
|
|
|
|
%install
|
2014-09-15 15:52:07 +00:00
|
|
|
%perl_make_install
|
2007-01-15 23:32:00 +00:00
|
|
|
%perl_process_packlist
|
2014-09-15 15:52:07 +00:00
|
|
|
%perl_gen_filelist
|
2007-01-15 23:32:00 +00:00
|
|
|
|
2014-09-15 15:52:07 +00:00
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%doc CHANGES README
|
2007-01-15 23:32:00 +00:00
|
|
|
|
2009-06-18 15:14:13 +00:00
|
|
|
%changelog
|