Aiming at the problem that content caching cannot meet user needs in traditional network architecture, and the conflict between low latency requirements and high communication cost in content delivery, this paper studies the joint content caching and content delivery problem considering horizontal cooperation between edge nodes in the edge computing scenario. Considering the bandwidth cost and content delivery delay requirements in the content delivery process, this paper proposes a Lyapunov optimization and branch-and-bound-based online content caching and delivery algorithm (LBB-CCD). The algorithm decomposes the continuous content caching and delivery optimization problem into multiple single-slot online optimization problems based on the Lyapunov optimization theory and solves them using a branch-and-bound algorithm, realizing efficient content caching and content delivery decisions.This paper verifies the optimality guarantee of the content delivery delay of the algorithm through theoretical analysis, and evaluates the performance of the algorithm through simulations. Simulations show that the performance of the LBB-CCD algorithm is better than that of the comparison algorithms, and it can achieve lower content delivery delay and improve the content hit rate under a limited content delivery cost budget.