Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Streams: move image cache

Started by Muut Archive 10 years ago · 2 replies · 284 views
10 years ago

Hello, i need to move image cache to another location. I moved cache using:

YAML
cache:
    type: Stream
    prefixes:
      '': [newLocation/cache]

page's content is moved fine, but no page images are loaded. Can you please help me move image cache? Thanks in advance.

10 years ago

You need do define it like this:

YAML
cache:
  type: 'Stream',
  prefixes:
    '': ['cache'],
    images: ['images']
10 years ago

Still not working for me. I tried setup.php:

PHP
<?php
return [
    'streams' => [
        'schemes' => [
            'page' => [
                'type' => 'Stream',
        'prefixes' => [
                   '' => ['new_folder/user/pages'],
                ]
            ],
        ]
    ]
];

with this setup.php grav will not load any pages, so i tried user/config/streams.yaml with:

YAML
schemes:
  page: 
    type: Stream
    prefixes:
      '': ['new_folder/user/pages']
  cache:
    type: Stream
    prefixes:
      '': ['new_folder/cache']
      images: ['new_folder/images']

and grav will load all pages, but images are not showing. I am confused about what i'm doing wrong.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago