Remove cache implementation, to be discussed and done later

This commit is contained in:
Bruno Martins
2019-06-13 10:47:00 -04:00
committed by mdavidsaver
parent 6a163d7fd4
commit 9702b68d72
18 changed files with 69 additions and 197 deletions

View File

@@ -139,20 +139,14 @@ bool NTMatrix::is_a(PVStructurePtr const & pvStructure)
return is_a(pvStructure->getStructure());
}
static epicsThreadOnceId cachedResultOnceId = EPICS_THREAD_ONCE_INIT;
static epicsThreadPrivateId cachedResultId;
bool NTMatrix::isCompatible(StructureConstPtr const & structure)
{
if (!structure)
return false;
Result& result = Result::fromCache(&cachedResultOnceId, &cachedResultId);
Result result(structure);
if (result.wraps(structure))
return result.valid();
return result.reset(structure)
return result
.is<Structure>()
.has<ScalarArray>("value")
.maybeHas<ScalarArray>("dim")