import pickle
import os

from .save import chmod_rw_all


class Cache:
    def __init__(self, filename):
        self.filename = "pickle/" + filename

    def exists(self):
        return os.path.isfile(self.filename)

    def save(self, data):
        pickle.dump(data, open(self.filename, "w+b"))
        chmod_rw_all(self.filename)

    def load(self):
        data = pickle.load(open(self.filename, "r+b"))
        return data

efe06808f27fc0e18cdca56f62b2951adea1142d
<mask token>


class Cache:
    <mask token>

    def exists(self):
        return os.path.isfile(self.filename)
    <mask token>

    def load(self):
        data = pickle.load(open(self.filename, 'r+b'))
        return data

<mask token>


class Cache:

    def __init__(self, filename):
        self.filename = 'pickle/' + filename

    def exists(self):
        return os.path.isfile(self.filename)
    <mask token>

    def load(self):
        data = pickle.load(open(self.filename, 'r+b'))
        return data

<mask token>


class Cache:

    def __init__(self, filename):
        self.filename = 'pickle/' + filename

    def exists(self):
        return os.path.isfile(self.filename)

    def save(self, data):
        pickle.dump(data, open(self.filename, 'w+b'))
        chmod_rw_all(self.filename)

    def load(self):
        data = pickle.load(open(self.filename, 'r+b'))
        return data

import pickle
import os
from .save import chmod_rw_all


class Cache:

    def __init__(self, filename):
        self.filename = 'pickle/' + filename

    def exists(self):
        return os.path.isfile(self.filename)

    def save(self, data):
        pickle.dump(data, open(self.filename, 'w+b'))
        chmod_rw_all(self.filename)

    def load(self):
        data = pickle.load(open(self.filename, 'r+b'))
        return data

import pickle
import os

from .save import chmod_rw_all


class Cache:
    def __init__(self, filename):
        self.filename = "pickle/" + filename

    def exists(self):
        return os.path.isfile(self.filename)

    def save(self, data):
        pickle.dump(data, open(self.filename, "w+b"))
        chmod_rw_all(self.filename)

    def load(self):
        data = pickle.load(open(self.filename, "r+b"))
        return data
