X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-z-cache.cpp;h=dc58b25a0d8de581274c3326a49fee18f6603aba;hb=29d5f0cb70a5a61924e3b729f6ce5998cd6485ab;hp=975aee9fad8c186e022ea5244a33f97cda1db570;hpb=5554ddf9c4d9670aaaa8f8b9ce6def1dadff3c96;p=yazpp-moved-to-github.git diff --git a/src/yaz-z-cache.cpp b/src/yaz-z-cache.cpp index 975aee9..dc58b25 100644 --- a/src/yaz-z-cache.cpp +++ b/src/yaz-z-cache.cpp @@ -1,12 +1,13 @@ /* - * Copyright (c) 2002-2003, Index Data. + * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-cache.cpp,v 1.7 2003-10-10 17:58:30 adam Exp $ + * $Id: yaz-z-cache.cpp,v 1.11 2004-12-13 20:50:54 adam Exp $ */ #include -#include +#include +#include struct Yaz_RecordCache_Entry { int m_offset; @@ -87,10 +88,7 @@ void Yaz_RecordCache::add (ODR o, Z_NamePlusRecordList *npr, int start, int hits) { if (nmem_total(m_mem) > m_max_size) - { - yaz_log(LOG_LOG, "cache size"); return; - } // Build appropriate compspec for this response Z_RecordComposition *comp = 0; if (hits == -1 && m_presentRequest) @@ -170,7 +168,7 @@ int Yaz_RecordCache::match (Yaz_RecordCache_Entry *entry, oid_to_dotstring(entry->m_record->u.databaseRecord->direct_reference, mstr1); char mstr2[100]; oid_to_dotstring(syntax, mstr2); - yaz_log(LOG_LOG, "match fail 3 d=%s s=%s", mstr1, mstr2); + yaz_log(YLOG_LOG, "match fail 3 d=%s s=%s", mstr1, mstr2); #endif return 0; @@ -182,7 +180,7 @@ int Yaz_RecordCache::lookup (ODR o, Z_NamePlusRecordList **npr, Z_RecordComposition *comp) { int i; - yaz_log(LOG_DEBUG, "cache lookup start=%d num=%d", start, num); + yaz_log(YLOG_DEBUG, "cache lookup start=%d num=%d", start, num); for (i = 0; i