Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MetaDataCache suggestion #152

Open
drkibitz opened this issue Jul 1, 2013 · 2 comments
Open

MetaDataCache suggestion #152

drkibitz opened this issue Jul 1, 2013 · 2 comments

Comments

@drkibitz
Copy link
Contributor

drkibitz commented Jul 1, 2013

I really like the cache feature, and that you can pass resources directly in options ;)

But just a suggestion to maybe create another class called MetadataCacheInclude or something.

Basically it writes a PHP file to disk, and includes it next time around. Even more simple alternative to MetadataCacheFile.

Too much kool-aid?

@peej
Copy link
Owner

peej commented Jul 1, 2013

Not sure what you mean, can you explain?

@drkibitz
Copy link
Contributor Author

drkibitz commented Jul 1, 2013

Something like:

public function save($resources)
{
    return file_put_contents($this->filename, '<?php return ' . var_export($resources, true) . ';');
}

public function load()
{
    return include $this->filename;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants