Considering the advantages of mobile edge computing (MEC), such as low latency, high bandwidth, etc., more and more mobile services are cached to mobile edge servers. However, due to limited computing resources and storage capacity of mobile edge servers, it is hard to guarantee that all services are cached and all computation offloading requests are satisfied. In this paper, we jointly optimize service caching and computation offloading to maximize system profits in mobile edge-cloud computing (MECC). The problem is formalized as a nonconvex optimization problem with discrete variables. We propose a Dynamic Joint computation Offloading and Service Caching algorithm (DJOSC) to solve the problem. Specifically, a regularization technique and Lyapunov optimization theory are used to transform the problem into two subproblems, which are solved by convex optimization techniques. Numerical evaluations show that the maximum system profits can be achieved under different computing resources, storage capacities and bandwidth capacities.