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. 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:
receive, from an original hosting entity, a first request to create a cached data,
wherein the original hosting entity hosts one or more original resources corresponding to a source of the cached data,
wherein the first request comprises instructions to collect statistical information of the cached data;
create the cached data;
collect statistical information of the cached data based on the instructions;
send, to the original hosting entity, the statistical information of the cached data;
receive, from the original hosting entity, a second request to perform a management operation on the cached data; and
perform the management operation on the cached data, wherein the management operation to delete the cached data is determined by the original hosting entity based on the statistical information of the cached data and an expiration time of the cached data.
2. The apparatus of claim 1 , wherein the statistical information comprises frequency of retrieval of the cached data.
3. The apparatus of claim 1 , wherein the first request comprises expiration time of the cached data.
4. The apparatus of claim 1 , the executable instructions comprises a second management operation that comprises refresh or update of the cached data.
5. The apparatus of claim 1 , the executable instructions comprise a second management operation that comprises to refresh the cached data which is determined by the original hosting entity based on an expiration time of the cached data.
6. The apparatus of claim 1 , further computer-executable instructions which cause the apparatus to send, to the original hosting entity, a message confirming the creation of the cached data.
7. The apparatus of claim 6 , wherein the message comprises an indicator of a location to store the statistical information of the cached data.
8. The apparatus of claim 1 , further computer-executable instructions which cause the apparatus to send, to the original hosting entity, a message confirming the management operation performed on the cached data.
9. The apparatus of claim 8 , wherein the message comprises the statistical information of the cached data.
10. A method comprising:
receiving, from an original hosting entity, a first request to create a cached data,
wherein the original hosting entity hosts one or more original resources corresponding to a source of the cached data,
wherein the first request comprises instructions to collect statistical information of the cached data;
creating the cached data;
collecting statistical information of the cached data based on the instructions;
sending, to the original hosting entity, statistical information of the cached data;
receiving, from the original hosting entity, a second request to perform a management operation on the cached data; and
performing the management operation on the cached data, wherein the management operation to delete the cached data is determined by the original hosting entity based on the statistical information of the cached data and an expiration time of the cached data.
11. The method of claim 10 , wherein the statistical information comprises frequency of retrieval of the cached data.
12. The method of claim 10 , wherein the first request comprises expiration time of the cached data.
13. The method of claim 10 , the executable instruction comprises a second management operation that comprises refresh or update of the cached data.
14. The method of claim 10 , the executable instructions comprise a second management operation that comprises to refresh the cached data is determined by the original hosting entity based on the expiration time of the cached data.
15. The method of claim 10 , further comprising sending, to the original hosting entity, a message confirming the creation of the cached data.
16. The method of claim 15 , wherein the message comprises an indicator of a location to store the statistical information of the cached data.
17. The method of claim 10 , further comprising sending, to the original hosting entity, a message confirming the management operation performed on the cached data.
18. The method of claim 17 , wherein the message comprises the statistical information of the cached data.