Due to the VM contention on shared computing resources, especially shared caches, in datacenters, cloud computing paradigm inevitably brings noticeable performance overhead of VMs to customers. Therefore, taking advantage of both spatial and temporal locality to efficiently excavate cache plays an important role in bridging the performance gap between processor cores and main memory. This paper is motivated by two key observations: (1) the access behavior is highly non-uniform and dynamic at the cache line level; (2) neither current spatial nor temporal cache management schemes can efficiently utilize cache capacity for excessively focusing on inter cache line, ignoring the optimization within cache line. Therefore, we propose a novel adaptive scheme, called BADP, which combines task's behavior to place data for improving locality at the cache line level. In the proposed scheme, a cache line level monitor captures the behavior of individual variables accessing and judiciously places variables together with similar behavior so that preventing the underutilized variables in the cache line occupying the valuable cache. The controller decides on the best placement for all variables. Further, our BADP can cooperate with current state-of-the-art cache management schemes.