System and methods for service layer cache management
A caching entity may store a cached copy of a service layer resource. An original hosting entity may maintain a registry of the corresponding cached resources. Optionally, the original hosting entity may set cache parameters to govern the lifetime of the cache on a caching entity. The caching entity may keep storing the cached copy of the resource and the original hosting entity may obtain statistics about the cached resource. By knowing the statistics, e.g. how many times a resource is retrieved on each caching entity, the original hosting entity may better manage the resource.
1. A method of managing cached resource data of a machine-to-machine service layer by an original hosting entity, the method comprising:
instructing, by the original hosting entity, a caching entity to collect statistical information of a use of a cached service layer resource data at a location, wherein the statistical information comprises frequency of retrieval and cache expiration time;
sending, by the original hosting entity to the caching entity, a message to manage the cached service layer resource data to a location to be cached in the caching entity;
receiving, by the original hosting entity from the caching entity, confirmation of managing the cached service layer resource data, wherein the confirmation comprises statistical information of the use of the cached service layer resource data;
storing, by the original hosting entity, information related to the cached service layer resource data in a service layer cache registry;
based on the information, providing instructions, by the original hosting entity, to further manage the cached service layer resource data; and
using, by the original hosting entity, the service layer cache registry to manage the cached service layer resource data in the caching entity, wherein the management includes an operation with respect to the cached service layer resource data, wherein the operation is initiated by the original hosting entity.
2. The method of claim 1 , wherein the original hosting entity is a machine-to-machine gateway and the caching entity is a machine-to-machine server.
3. The method of claim 1 , wherein the caching entity initiates a refresh operation to refresh the cached service layer resource data.
4. The method of claim 1 , wherein the original hosting entity initiates a refresh operation to refresh the cached service layer resource data.
5. The method of claim 1 , wherein the machine-to-machine service layer comprises a service supporting capabilities through set of application programming interfaces (APIs).
6. The method of claim 1 , wherein the information related to the cached service layer resource data further comprises access control policy for attributes or sub-resources.
7. An apparatus comprising a processor and a memory, the memory storing computer-executable instructions which, when executed by the processor of the apparatus, cause the apparatus to:
instruct, by an original hosting entity, a caching entity to collect statistical information of a use of a cached service layer resource data at a location, wherein the statistical information comprises frequency of retrieval and cache expiration time;
send, by the original hosting entity, to the caching entity, a message to manage cached service layer resource data to a location to be cached in the caching entity;
receive, by the original hosting entity from the caching entity, confirmation of managing the cached service layer resource data, wherein the confirmation comprises statistical information of the use of the cached service layer resource data;
store, by the original hosting entity, information related to the cached service layer resource data in a service layer cache registry, wherein the information related to the cached service layer resource data further comprises access control policy for attributes or sub-resource; and
based on the information, provide instructions, by the original hosting entity, to further manage the cached service layer resource data.
8. The apparatus of claim 7 , the operations further comprising using, by the original hosting entity, the service layer cache registry to manage the cached service layer resource data in the caching entity, wherein the management includes an operation with respect to the cached service layer resource data, wherein the operation is a refresh operation.
9. The apparatus of claim 7 , the operations further comprising using, by the original hosting entity, the service layer cache registry to manage the cached service layer resource data in the caching entity, wherein the management includes an operation with respect to the cached service layer resource data, wherein the operation is an update operation.
10. The apparatus of claim 7 , the operations further comprising using, by the original hosting entity, the service layer cache registry to manage the cached service layer resource data in the caching entity, wherein the management includes an operation with respect to the cached service layer resource data, wherein the operation is a delete operation.
11. The apparatus of claim 10 , the operations further comprising using, by the original hosting entity, the service layer cache registry to manage the cached service layer resource data in the caching entity, wherein the management includes an operation with respect to the cached service layer resource data, wherein the operation is initiated by a request sent from the location.
12. The apparatus of claim 7 , wherein the layer comprises a service supporting capabilities through set of application programming interfaces (APIs).