In this paper, cooperative caching is investigated in fog radio access networks (F-RAN). To maximize the offloaded traffic, cooperative caching optimization problem is formulated. By analyzing the relationship between clustering and cooperation and utilizing the solutions of the knapsack problems, the above challenging optimization problem is transformed into a clustering subproblem and a content placement subproblem. To further reduce complexity, we propose an effective graph-based approach to solve the two subproblems. In the graph-based clustering approach, a node graph and a weighted graph are constructed. By setting the weights of the vertices of the weighted graph to be the incremental offloaded traffics of their corresponding complete subgraphs, the objective cluster sets can be readily obtained by using an effective greedy algorithm to search for the max-weight independent subset. In the graph-based content placement approach, a redundancy graph is constructed by removing the edges in the complete subgraphs of the node graph corresponding to the obtained cluster sets. Furthermore, we enhance the caching decisions to ensure each duplicate file is cached only once. Compared with traditional approximate solutions, our proposed graph-based approach has lower complexity. Simulation results show remarkable improvements in terms of offloaded traffic by using our proposed approach.