A cache management method, wherein multiple cache subunits are disposed in a cache, and each of the cache subunits comprises multiple cache lines; a length of the cache line comprised in each cache subunit is different from a length of a cache line comprised in another cache subunit; each of the cache subunits is configured to store data at a corresponding level, the level is a strength level of spatial locality of the data, and a correspondence between the cache subunit and the level is: the length of the cache line comprised in the cache subunit is in a positive correlation with strength of spatial locality of the data; and the method comprises: receiving an access request, and determining data that is to be accessed and that needs to be accessed according to the access request; determining a strength level of spatial locality of the data to be accessed; wherein the determining a strength level of spatial locality of the data to be accessed comprises: recording addresses of data that is to be accessed and that needs to be accessed according to access requests, and collecting statistics about access rules of the addresses of the data to be accessed, wherein the access rule comprises a quantity of times or a probability that data of an address adjacent to the addresses is accessed according to another access request; and classifying, into levels according to the quantity of times or the probability that data of the address adjacent to the addresses of the data to be accessed is accessed by another access request, spatial locality of the data to be accessed; and allocating , according to the strength level of the spatial locality of the data to be accessed, a cache subunit corresponding to the level to the data to be accessed. receiving an access request, and determining data that is to be accessed and that needs to be accessed according to the access request; determining a strength level of spatial locality of the data to be accessed; wherein the determining a strength level of spatial locality of the data to be accessed comprises: recording addresses of data that is to be accessed and that needs to be accessed according to access requests, and collecting statistics about access rules of the addresses of the data to be accessed, wherein the access rule comprises a quantity of times or a probability that data of an address adjacent to the addresses is accessed according to another access request; and classifying, into levels according to the quantity of times or the probability that data of the address adjacent to the addresses of the data to be accessed is accessed by another access request, spatial locality of the data to be accessed; and allocating , according to the strength level of the spatial locality of the data to be accessed, a cache subunit corresponding to the level to the data to be accessed. recording addresses of data that is to be accessed and that needs to be accessed according to access requests, and collecting statistics about access rules of the addresses of the data to be accessed, wherein the access rule comprises a quantity of times or a probability that data of an address adjacent to the addresses is accessed according to another access request; and classifying, into levels according to the quantity of times or the probability that data of the address adjacent to the addresses of the data to be accessed is accessed by another access request, spatial locality of the data to be accessed; and allocating , according to the strength level of the spatial locality of the data to be accessed, a cache subunit corresponding to the level to the data to be accessed. <EOS>