func (store *Cache) RetrieveUpdatedObjects(orgID string, objectType string, received bool) ([]common.MetaData, common.SyncServiceError) {
	return store.Store.RetrieveUpdatedObjects(orgID, objectType, received)
}
RetrieveUpdatedObjects returns the list of all the edge updated objects that are not marked as consumed or received
If received is true, return objects marked as received
package storage
import (
	"fmt"
	"io"
	"sync"
	"time"
	"github.com/open-horizon/edge-sync-service/common"
)
type Cache struct {
	destinations map[string]map[string]common.Destination
	Store        Storage
	lock         sync.RWMutex
}
func (store *Cache) Init() common.SyncServiceError {
	if err := store.Store.Init(); err != nil {
		return err
	}
	return store.cacheDestinations()
}
func (store *Cache) cacheDestinations() common.SyncServiceError {
	destinations, err := store.Store.RetrieveDestinations("", "")
	if err != nil {
		return &Error{"Failed to initialize the cache. Error: " + err.Error()}
	}
	store.lock.Lock()
	defer store.lock.Unlock()
	store.destinations = make(map[string]map[string]common.Destination, 0)
	for _, dest := range destinations {
		if store.destinations[dest.DestOrgID] == nil {
			store.destinations[dest.DestOrgID] = make(map[string]common.Destination, 0)
		}
		id := dest.DestType + ":" + dest.DestID
		store.destinations[dest.DestOrgID][id] = dest
	}
	return nil
}
func (store *Cache) Stop() {
	store.Store.Stop()
}
func (store *Cache) PerformMaintenance() {
	store.Store.PerformMaintenance()
}
func (store *Cache) Cleanup(isTest bool) common.SyncServiceError {
	return store.Store.Cleanup(isTest)
}
func (store *Cache) StoreObject(metaData common.MetaData, data []byte, status string) ([]common.StoreDestinationStatus, common.SyncServiceError) {
	return store.Store.StoreObject(metaData, data, status)
}
func (store *Cache) StoreObjectData(orgID string, objectType string, objectID string, dataReader io.Reader) (bool, common.SyncServiceError) {
	return store.Store.StoreObjectData(orgID, objectType, objectID, dataReader)
}
func (store *Cache) StoreObjectTempData(orgID string, objectType string, objectID string, dataReader io.Reader) (bool, common.SyncServiceError) {
	return store.Store.StoreObjectTempData(orgID, objectType, objectID, dataReader)
}
func (store *Cache) RemoveObjectTempData(orgID string, objectType string, objectID string) common.SyncServiceError {
	return store.Store.RemoveObjectTempData(orgID, objectType, objectID)
}
func (store *Cache) RetrieveTempObjectData(orgID string, objectType string, objectID string) (io.Reader, common.SyncServiceError) {
	return store.Store.RetrieveTempObjectData(orgID, objectType, objectID)
}
func (store *Cache) AppendObjectData(orgID string, objectType string, objectID string, dataReader io.Reader, dataLength uint32,
	offset int64, total int64, isFirstChunk bool, isLastChunk bool) common.SyncServiceError {
	return store.Store.AppendObjectData(orgID, objectType, objectID, dataReader, dataLength, offset, total, isFirstChunk, isLastChunk)
}
func (store *Cache) UpdateObjectStatus(orgID string, objectType string, objectID string, status string) common.SyncServiceError {
	return store.Store.UpdateObjectStatus(orgID, objectType, objectID, status)
}
func (store *Cache) UpdateObjectSourceDataURI(orgID string, objectType string, objectID string, sourceDataURI string) common.SyncServiceError {
	return store.Store.UpdateObjectSourceDataURI(orgID, objectType, objectID, sourceDataURI)
}
func (store *Cache) RetrieveObjectStatus(orgID string, objectType string, objectID string) (string, common.SyncServiceError) {
	return store.Store.RetrieveObjectStatus(orgID, objectType, objectID)
}
func (store *Cache) RetrieveObjectRemainingConsumers(orgID string, objectType string, objectID string) (int, common.SyncServiceError) {
	return store.Store.RetrieveObjectRemainingConsumers(orgID, objectType, objectID)
}
func (store *Cache) DecrementAndReturnRemainingConsumers(orgID string, objectType string, objectID string) (int,
	common.SyncServiceError) {
	return store.Store.DecrementAndReturnRemainingConsumers(orgID, objectType, objectID)
}
func (store *Cache) DecrementAndReturnRemainingReceivers(orgID string, objectType string, objectID string) (int,
	common.SyncServiceError) {
	return store.Store.DecrementAndReturnRemainingReceivers(orgID, objectType, objectID)
}
func (store *Cache) ResetObjectRemainingConsumers(orgID string, objectType string, objectID string) common.SyncServiceError {
	return store.Store.ResetObjectRemainingConsumers(orgID, objectType, objectID)
}